Fix line panning

This commit is contained in:
Jaex 2017-11-16 13:42:13 +03:00
parent 165548f376
commit b73ac79e4d
2 changed files with 4 additions and 1 deletions

View file

@ -128,7 +128,8 @@ public void AddShapePath(GraphicsPath gp, int sizeOffset = 0)
public virtual void Move(int x, int y)
{
Rectangle = Rectangle.LocationOffset(x, y);
StartPosition = StartPosition.Add(x, y);
EndPosition = EndPosition.Add(x, y);
}
public void Move(Point offset)

View file

@ -176,6 +176,8 @@ protected virtual Pen CreatePen(Color borderColor, int borderSize)
public override void Move(int x, int y)
{
base.Move(x, y);
for (int i = 0; i < Points.Length; i++)
{
Points[i] = Points[i].Add(x, y);