Removed "rotate" leftovers. Also implemented transform in the ImageContainer, be aware: scaling will probably cause artefakts if we "undo"...

This commit is contained in:
RKrom 2014-06-02 10:27:58 +02:00
parent 4b8ec88aaf
commit 621cc7fd0c
3 changed files with 42 additions and 20 deletions

View file

@ -692,10 +692,16 @@ namespace Greenshot.Drawing {
Invalidate();
}
public virtual bool CanRotate {
get {
return true;
}
/// <summary>
/// Retrieve the rotation angle from the matrix
/// </summary>
/// <param name="matrix"></param>
/// <returns></returns>
public static int CalculateAngle(Matrix matrix) {
const int M11 = 0;
const int M21 = 2;
var radians = Math.Atan2(matrix.Elements[M21], matrix.Elements[M11]);
return (int)-Math.Round(radians * 180 / Math.PI);
}
/// <summary>