From 219fd48453607dbf8d4cd6eb173418456367bfd0 Mon Sep 17 00:00:00 2001 From: RKrom Date: Wed, 28 Nov 2012 17:15:55 +0000 Subject: [PATCH] "fixed" that the ellipse of the zoom region didn't match the destination rectangle. It's not perfect yet, as the upper side is 91px, the lower side 92px... but this might be a problem with the pen, which draws a 9px thick line... to be continued. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2325 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Forms/CaptureForm.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs index fc0547354..429428789 100644 --- a/Greenshot/Forms/CaptureForm.cs +++ b/Greenshot/Forms/CaptureForm.cs @@ -516,8 +516,9 @@ namespace Greenshot.Forms { graphics.CompositingQuality = CompositingQuality.HighSpeed; graphics.PixelOffsetMode = PixelOffsetMode.None; + int pixelThickness = destinationRectangle.Width / sourceRectangle.Width; using (GraphicsPath path = new GraphicsPath()) { - path.AddEllipse(destinationRectangle); + path.AddEllipse(new Rectangle(destinationRectangle.Location, new Size(destinationRectangle.Width - pixelThickness, destinationRectangle.Height - pixelThickness))); using (Region clipRegion = new Region(path)) { graphics.Clip = clipRegion; graphics.FillRectangle(backgroundBrush,destinationRectangle); @@ -525,7 +526,6 @@ namespace Greenshot.Forms { } } - int pixelThickness = destinationRectangle.Width / sourceRectangle.Width; using (Pen pen = new Pen(Color.Black, pixelThickness)) { int halfWidth = (destinationRectangle.Width >> 1) - (pixelThickness >> 1); int halfWidthEnd = (destinationRectangle.Width >> 1) - pixelThickness;