mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
Improved calculating the new location, when rotating. Still not correct, but it is better :)
This commit is contained in:
parent
3eaaf9a49f
commit
ee911e3cdf
2 changed files with 11 additions and 17 deletions
|
@ -215,14 +215,12 @@ namespace Greenshot.Core {
|
|||
RotateFlipType flipType;
|
||||
if (Angle == 90) {
|
||||
matrix.Rotate(90);
|
||||
matrix.Translate(-sourceImage.Height, 0);
|
||||
//matrix.RotateAt(90, new Point(sourceImage.Width / 2, sourceImage.Height / 2));
|
||||
matrix.Translate(0, -sourceImage.Height);
|
||||
flipType = RotateFlipType.Rotate90FlipNone;
|
||||
} else if (Angle == -90 || Angle == 270) {
|
||||
flipType = RotateFlipType.Rotate270FlipNone;
|
||||
matrix.Rotate(-90);
|
||||
//matrix.RotateAt(-90, new Point(sourceImage.Width / 2, sourceImage.Height / 2));
|
||||
matrix.Translate(0, -sourceImage.Width);
|
||||
matrix.Translate(-sourceImage.Width, 0);
|
||||
} else {
|
||||
throw new NotSupportedException("Currently only an angle of 90 or -90 (270) is supported.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue