mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-07 07:26:05 +12:00
Override Move in freehand region shape
This commit is contained in:
parent
4414ed888e
commit
4dbaa392e6
|
@ -51,12 +51,7 @@ public override void OnUpdate()
|
||||||
}
|
}
|
||||||
else if (Manager.IsMoving)
|
else if (Manager.IsMoving)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < points.Count; i++)
|
Move(InputManager.MouseVelocity);
|
||||||
{
|
|
||||||
points[i] = points[i].Add(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y);
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle = Rectangle.LocationOffset(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,5 +74,15 @@ public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
|
||||||
gp.CloseFigure();
|
gp.CloseFigure();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Move(int x, int y)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < points.Count; i++)
|
||||||
|
{
|
||||||
|
points[i] = points[i].Add(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle = Rectangle.LocationOffset(x, y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue