We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DrawingView does not take into account lineWidth when rendering the lines onto a canvas to output image.
Example image was done with lineWidth = 5.
Looks like Min and max of points is being taken to calculate size of canvas, need to add half the width of the linewidth to the min and max.
That rendered image would not be cut off at edges and would have smooth lines.
Problem areas highlighted in red.
https://github.com/Captnwalker1/MauiSignaturePadExample
- .NET MAUI CommunityToolkit:3.0.0. - OS: Wub 10 10.0.19044 Build 19044 - .NET MAUI:6.0.486
No response
The text was updated successfully, but these errors were encountered:
A quick workaround I came up with is to add a clear border line to lines collection before rendering the image:
private DrawingLine MakeBorderLine(List<PointF> points,float lineWidth) { var line = new DrawingLine(); line.LineColor = Color.FromArgb("00000000"); line.Points.Add(new PointF(points.Min(x => x.X) + lineWidth,points.Min(y => y.Y) - lineWidth)); line.Points.Add(new PointF(points.Min(x => x.X) - lineWidth, points.Max(y => y.Y) + lineWidth)); line.Points.Add(new PointF(points.Max(x => x.X) + lineWidth, points.Min(y => y.Y) - lineWidth)); line.Points.Add(new PointF(points.Max(x => x.X) + lineWidth, points.Max(y => y.Y) + lineWidth)); return line; }
Sorry, something went wrong.
[BUG] DrawingView GetImageStream cuts off lines on edge of image #773
be9fd45
[BUG] DrawingView GetImageStream cuts off lines on edge of image #773 (…
f05cdb1
…#788)
VladislavAntonyuk
Successfully merging a pull request may close this issue.
Is there an existing issue for this?
Current Behavior
DrawingView does not take into account lineWidth when rendering the lines onto a canvas to output image.
Example image was done with lineWidth = 5.
Looks like Min and max of points is being taken to calculate size of canvas, need to add half the width of the linewidth to the min and max.
Expected Behavior
That rendered image would not be cut off at edges and would have smooth lines.
Problem areas highlighted in red.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/Captnwalker1/MauiSignaturePadExample
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: