mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 14:24:43 -07:00
Review fixes
This commit is contained in:
parent
0c5abe915c
commit
66703b5ae3
3 changed files with 20 additions and 16 deletions
|
@ -186,7 +186,8 @@ namespace Greenshot.Editor.Drawing
|
||||||
var rotationAngle = GetRotationAngle();
|
var rotationAngle = GetRotationAngle();
|
||||||
if (rotationAngle != 0)
|
if (rotationAngle != 0)
|
||||||
{
|
{
|
||||||
graphics.DrawImage(RotateImage(bitmap, rotationAngle), Bounds);
|
using var newBitmap = RotateImage(bitmap, rotationAngle);
|
||||||
|
graphics.DrawImage(RotateImage(newBitmap, rotationAngle), Bounds);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -179,8 +179,12 @@ namespace Greenshot.Editor.Drawing
|
||||||
/// <param name="matrix"></param>
|
/// <param name="matrix"></param>
|
||||||
public override void Transform(Matrix matrix)
|
public override void Transform(Matrix matrix)
|
||||||
{
|
{
|
||||||
if (image != null)
|
if (image == null)
|
||||||
{
|
{
|
||||||
|
base.Transform(matrix);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int rotateAngle = CalculateAngle(matrix);
|
int rotateAngle = CalculateAngle(matrix);
|
||||||
// we currently assume only one transformation has been made.
|
// we currently assume only one transformation has been made.
|
||||||
if (rotateAngle != 0)
|
if (rotateAngle != 0)
|
||||||
|
@ -193,7 +197,6 @@ namespace Greenshot.Editor.Drawing
|
||||||
image = ImageHelper.ApplyEffect(image, new RotateEffect(rotateAngle), tmpMatrix);
|
image = ImageHelper.ApplyEffect(image, new RotateEffect(rotateAngle), tmpMatrix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
base.Transform(matrix);
|
base.Transform(matrix);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,8 @@ namespace Greenshot.Editor.Forms
|
||||||
|
|
||||||
private static readonly List<IImageEditor> EditorList = new List<IImageEditor>();
|
private static readonly List<IImageEditor> EditorList = new List<IImageEditor>();
|
||||||
|
|
||||||
|
private static bool? _emojifontInstalled;
|
||||||
|
|
||||||
private Surface _surface;
|
private Surface _surface;
|
||||||
private GreenshotToolStripButton[] _toolbarButtons;
|
private GreenshotToolStripButton[] _toolbarButtons;
|
||||||
|
|
||||||
|
@ -190,10 +192,8 @@ namespace Greenshot.Editor.Forms
|
||||||
|
|
||||||
private void HideEmojiButtonWhenFontIsNotInstalled()
|
private void HideEmojiButtonWhenFontIsNotInstalled()
|
||||||
{
|
{
|
||||||
if (!FontFamily.Families.Any(f => string.Equals(f.Name, "Segoe UI Emoji", StringComparison.OrdinalIgnoreCase)))
|
_emojifontInstalled ??= FontFamily.Families.Any(f => string.Equals(f.Name, "Segoe UI Emoji", StringComparison.OrdinalIgnoreCase));
|
||||||
{
|
btnEmoji.Visible = _emojifontInstalled.Value;
|
||||||
btnEmoji.Visible = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue