-
Notifications
You must be signed in to change notification settings - Fork 20
Added new kb article extracting-point-data-from-signature-signaturepad-dotnet-maui #1274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the generator messed up the formatting (a lot). Ping me if you need to discuss the suggested changes.
| title: Extracting Point Data from Signature in SignaturePad for UI for .NET MAUI | ||
| description: Learn how to extract point and line data from a signature in the SignaturePad component for UI for .NET MAUI. | ||
| type: how-to | ||
| page_title: How to Extract Point Data from SignaturePad in UI for .NET MAUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed.
|
|
||
| ## Description | ||
|
|
||
| I want to extract point and line data from the signature created using the [SignaturePad](https://docs.telerik.com/devtools/maui/controls/signaturepad/overview) component of UI for .NET MAUI. The goal is to format the signature data as a string that represents the x, y coordinates of the strokes in the signature. Different formats for the output data are required, such as a custom format or an SVG-like format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| I want to extract point and line data from the signature created using the [SignaturePad](https://docs.telerik.com/devtools/maui/controls/signaturepad/overview) component of UI for .NET MAUI. The goal is to format the signature data as a string that represents the x, y coordinates of the strokes in the signature. Different formats for the output data are required, such as a custom format or an SVG-like format. | |
| I want to extract point and line data from the signature created using the [SignaturePad](https://docs.telerik.com/devtools/maui/controls/signaturepad/overview) control of UI for .NET MAUI. The goal is to format the signature data as a string that represents the x, y coordinates of the strokes in the signature. Different formats for the output data are required, such as a custom format or an SVG-like format. |
|
|
||
| Create a method to process the image and extract vector data. This involves three stages: | ||
|
|
||
| **Stage 1: Prepare Bitmaps** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Stage 1: Prepare Bitmaps** | |
| 1. Prepare the Bitmaps. |
| Create a method to process the image and extract vector data. This involves three stages: | ||
|
|
||
| **Stage 1: Prepare Bitmaps** | ||
| - Decode the image bytes into `SKBitmap`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Decode the image bytes into `SKBitmap`. | |
| 1. Decode the image bytes into `SKBitmap`. |
|
|
||
| **Stage 1: Prepare Bitmaps** | ||
| - Decode the image bytes into `SKBitmap`. | ||
| - Create a grayscale bitmap for better contrast. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Create a grayscale bitmap for better contrast. | |
| 2. Create a grayscale bitmap for better contrast. |
| **Stage 2: Scan Bitmap and Create Point Groups** | ||
| - Scan the binary bitmap for black pixels. | ||
| - Group neighboring black pixels into strokes using an algorithm. | ||
| - Store grouped strokes as `List<List<SKPoint>>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - Store grouped strokes as `List<List<SKPoint>>`. | |
| 3. Store the grouped strokes as `List<List<SKPoint>>`. |
| - Group neighboring black pixels into strokes using an algorithm. | ||
| - Store grouped strokes as `List<List<SKPoint>>`. | ||
|
|
||
| **Stage 3: Format the Data** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Stage 3: Format the Data** | |
| 3. Serialize the grouped strokes into your preferred format: | |
| - Custom: `"1,2;3,4;5,6/7,8;9,10;11,12"` | |
| - SVG-like: `"M x y L x y L x y ..."` |
| - Store grouped strokes as `List<List<SKPoint>>`. | ||
|
|
||
| **Stage 3: Format the Data** | ||
| - Serialize the grouped strokes into a desired format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete.
| **Stage 3: Format the Data** | ||
| - Serialize the grouped strokes into a desired format. | ||
| - Supported formats: | ||
| - Custom: `"1,2;3,4;5,6/7,8;9,10;11,12"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete.
| - Serialize the grouped strokes into a desired format. | ||
| - Supported formats: | ||
| - Custom: `"1,2;3,4;5,6/7,8;9,10;11,12"` | ||
| - SVG-like: `"M x y L x y L x y ..."` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete.
No description provided.