Fixed rotate, also working on the BitmapContainer

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1680 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-03-05 16:01:46 +00:00
parent 25f8d81d5a
commit 0bb7f87ee5
3 changed files with 62 additions and 38 deletions

View file

@ -100,7 +100,16 @@ namespace Greenshot.Drawing {
LOG.Debug("Loaded file: " + filename + " with resolution: " + Height + "," + Width);
}
}
public override void Rotate(RotateFlipType rotateFlipType) {
Bitmap newBitmap = ImageHelper.RotateFlip((Bitmap)bitmap, rotateFlipType);
if (bitmap != null) {
bitmap.Dispose();
}
bitmap = newBitmap;
base.Rotate(rotateFlipType);
}
public override void Draw(Graphics graphics, RenderMode rm) {
if (bitmap != null) {
bool shadow = GetFieldValueAsBool(FieldType.SHADOW);