mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Fixed rotating elements which are just rectangles, like the enum-label.
This commit is contained in:
parent
9d668f5226
commit
c19564b6e3
3 changed files with 15 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue