|
@@ -159,6 +159,7 @@ internal class BrushShapeOverlay : Overlay
|
|
|
|
|
|
|
|
protected override void OnOverlayPointerMoved(OverlayPointerArgs args)
|
|
protected override void OnOverlayPointerMoved(OverlayPointerArgs args)
|
|
|
{
|
|
{
|
|
|
|
|
+ isMouseDown = args.Properties.IsLeftButtonPressed;
|
|
|
if (!args.Properties.IsLeftButtonPressed && BrushData.BrushGraph != null)
|
|
if (!args.Properties.IsLeftButtonPressed && BrushData.BrushGraph != null)
|
|
|
{
|
|
{
|
|
|
ExecuteBrush(args.Point);
|
|
ExecuteBrush(args.Point);
|
|
@@ -180,6 +181,16 @@ internal class BrushShapeOverlay : Overlay
|
|
|
isMouseDown = false;
|
|
isMouseDown = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ protected override void OnOverlayPointerExited(OverlayPointerArgs args)
|
|
|
|
|
+ {
|
|
|
|
|
+ isMouseDown = false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ protected override void OnOverlayPointerEntered(OverlayPointerArgs args)
|
|
|
|
|
+ {
|
|
|
|
|
+ isMouseDown = args.Properties.IsLeftButtonPressed;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
protected override void OnKeyPressed(KeyEventArgs args)
|
|
protected override void OnKeyPressed(KeyEventArgs args)
|
|
|
{
|
|
{
|
|
|
UpdateBrushShape(lastDirCalculationPoint);
|
|
UpdateBrushShape(lastDirCalculationPoint);
|
|
@@ -216,12 +227,25 @@ internal class BrushShapeOverlay : Overlay
|
|
|
|
|
|
|
|
DrawConstrainedRope(targetCanvas, lastPoint, LastAppliedPoint, radius, paint);
|
|
DrawConstrainedRope(targetCanvas, lastPoint, LastAppliedPoint, radius, paint);
|
|
|
|
|
|
|
|
|
|
+ paint.Color = pointColor;
|
|
|
|
|
+ targetCanvas.DrawCircle(lastPoint, 5f / (float)ZoomScale, paint);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (StabilizationMode == StabilizationMode.TimeBased)
|
|
|
|
|
+ {
|
|
|
|
|
+ paint.Style = PaintStyle.Stroke;
|
|
|
|
|
+
|
|
|
|
|
+ paint.Color = pointColor;
|
|
|
|
|
+ targetCanvas.DrawCircle(LastAppliedPoint, 5f / (float)ZoomScale, paint);
|
|
|
|
|
+
|
|
|
|
|
+ paint.Color = ropeColor;
|
|
|
|
|
+ targetCanvas.DrawLine(LastAppliedPoint, lastPoint, paint);
|
|
|
|
|
+
|
|
|
paint.Color = pointColor;
|
|
paint.Color = pointColor;
|
|
|
targetCanvas.DrawCircle(lastPoint, 5f / (float)ZoomScale, paint);
|
|
targetCanvas.DrawCircle(lastPoint, 5f / (float)ZoomScale, paint);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (StabilizationMode == StabilizationMode.None)
|
|
|
|
|
|
|
+ if (StabilizationMode == StabilizationMode.None || !isMouseDown)
|
|
|
{
|
|
{
|
|
|
paint.Color = Colors.LightGray;
|
|
paint.Color = Colors.LightGray;
|
|
|
targetCanvas.DrawPath(BrushShape, paint);
|
|
targetCanvas.DrawPath(BrushShape, paint);
|