From 2c26d287ff4f5bd1cefc47ba11d67e950c86934a Mon Sep 17 00:00:00 2001 From: JKlingen Date: Sun, 25 Jan 2015 14:55:32 +0100 Subject: [PATCH] BUG-1735 fixed exception when scaling down screenshot with text element --- Greenshot/Drawing/TextContainer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs index 1a6d4655a..4bb5ebdf6 100644 --- a/Greenshot/Drawing/TextContainer.cs +++ b/Greenshot/Drawing/TextContainer.cs @@ -247,7 +247,7 @@ namespace Greenshot.Drawing { rect = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height); int pixelsAfter = rect.Width * rect.Height; - float factor = pixelsAfter / pixelsBefore; + float factor = pixelsAfter / (float)pixelsBefore; float fontSize = GetFieldValueAsFloat(FieldType.FONT_SIZE); fontSize *= factor;