Fixed rotating elements which are just rectangles, like the enum-label.

This commit is contained in:
RKrom 2014-05-31 23:38:12 +02:00
commit c19564b6e3
3 changed files with 15 additions and 5 deletions

View file

@ -707,6 +707,18 @@ namespace Greenshot.Drawing {
}
}
public virtual void Transform(Matrix matrix) {
if (matrix == null) {
return;
}
Point center = new Point(Left + (Width/2), Top + (Height/2));
Point[] points = { center };
matrix.TransformPoints(points);
Left = points[0].X - (Width / 2);
Top = points[0].Y - (Height / 2);
}
public virtual void Rotate(RotateFlipType rotateFlipType) {
// somehow the rotation is the wrong way?
int angle = 90;