mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Fix exception when rotating when counter are used, by prevent negative fontsize (#382)
This commit is contained in:
parent
2e13c57e2d
commit
a32cc1888b
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ namespace Greenshot.Editor.Drawing
|
|||
EllipseContainer.DrawEllipse(rect, graphics, rm, 0, Color.Transparent, fillColor, false);
|
||||
}
|
||||
|
||||
float fontSize = Math.Min(Width, Height) / 1.4f;
|
||||
float fontSize = Math.Min(Math.Abs(Width), Math.Abs(Height)) / 1.4f;
|
||||
using FontFamily fam = new FontFamily(FontFamily.GenericSansSerif.Name);
|
||||
using Font font = new Font(fam, fontSize, FontStyle.Bold, GraphicsUnit.Pixel);
|
||||
TextContainer.DrawText(graphics, rect, 0, lineColor, false, _stringFormat, text, font);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue