bug fix painting the signature
This commit is contained in:
parent
f911ab7f50
commit
ce5d3ce810
2 changed files with 54 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue