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
This commit is contained in:
RKrom 2012-11-25 13:41:06 +00:00
commit 69a88eeb25

View file

@ -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);
}
}