bug fix painting the signature

This commit is contained in:
Paul Schneider 2026-08-30 21:05:43 +01:00
commit ce5d3ce810
2 changed files with 54 additions and 2 deletions

View file

@ -87,5 +87,28 @@ public partial class SignaturePage : ContentPage
poly.Points = pts;
InkLayer.Children.Add(poly);
}
var pending = _control.PendingStroke;
if (pending.Count > 0)
{
var poly = new Polyline
{
Stroke = StrokeBrush,
StrokeThickness = StrokeThickness,
StrokeLineCap = PenLineCap.Round,
StrokeJoin = PenLineJoin.Round,
};
var pts = new List<Point>(pending.Count / 2);
for (int p = 0; p < pending.Count; p += 2)
{
int nx = pending[p];
int ny = pending[p + 1];
pts.Add(new Point(nx / CoordinateMax * w, ny / CoordinateMax * h));
}
poly.Points = pts;
InkLayer.Children.Add(poly);
}
}
}