Allow moving freehand drawing

This commit is contained in:
Jaex 2016-08-15 03:55:44 +03:00
parent cc4d9c4bcc
commit 4b0a323c9c

View file

@ -122,5 +122,20 @@ public override void OnDraw(Graphics g)
g.SmoothingMode = SmoothingMode.None;
}
}
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);
}
public override void Resize(int x, int y, bool fromBottomRight)
{
Move(x, y);
}
}
}