From 69a88eeb25fa9c958d3d50062c8189f2fbda821e Mon Sep 17 00:00:00 2001 From: RKrom Date: Sun, 25 Nov 2012 13:41:06 +0000 Subject: [PATCH] Added checkerboard for Zooming where nothing is visible.... might need some logic to prevent drawing if it's not needed. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2313 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- Greenshot/Forms/CaptureForm.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs index 986e7fd4b..264bdd051 100644 --- a/Greenshot/Forms/CaptureForm.cs +++ b/Greenshot/Forms/CaptureForm.cs @@ -48,6 +48,12 @@ namespace Greenshot.Forms { private static Brush RedOverlayBrush = new SolidBrush(Color.FromArgb(50, Color.DarkRed)); private static Pen OverlayPen = new Pen(Color.FromArgb(50, Color.Black)); private static CaptureForm currentForm = null; + private static Brush backgroundBrush = null; + + static CaptureForm() { + Image backgroundForTransparency = GreenshotPlugin.Core.GreenshotResources.getImage("Checkerboard.Image"); + backgroundBrush = new TextureBrush(backgroundForTransparency, WrapMode.Tile); + } private int mX; private int mY; @@ -500,6 +506,7 @@ namespace Greenshot.Forms { path.AddEllipse(destinationRectangle); using (Region clipRegion = new Region(path)) { graphics.Clip = clipRegion; + graphics.FillRectangle(backgroundBrush,destinationRectangle); graphics.DrawImage(capturedImage, destinationRectangle, sourceRectangle, GraphicsUnit.Pixel); } }