Override Move in freehand region shape

This commit is contained in:
Jaex 2016-08-03 12:08:06 +03:00
parent 4414ed888e
commit 4dbaa392e6

View file

@ -51,12 +51,7 @@ public override void OnUpdate()
}
else if (Manager.IsMoving)
{
for (int i = 0; i < points.Count; i++)
{
points[i] = points[i].Add(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y);
}
Rectangle = Rectangle.LocationOffset(InputManager.MouseVelocity.X, InputManager.MouseVelocity.Y);
Move(InputManager.MouseVelocity);
}
}
@ -79,5 +74,15 @@ public override void OnShapePathRequested(GraphicsPath gp, Rectangle rect)
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);
}
}
}