Changed logic of the DWM capture which tries to keep the window to capture on it's location, so less movement is visible. Also added a BoxBlur which might be a faster replacement of the CreateBlur (which is Gaussian), but the quality needs to be checked. For the BoxBlur the BitmapBuffer is extended with a few new tricks.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2245 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-11-06 15:59:19 +00:00
commit f63d4ca06e
5 changed files with 200 additions and 25 deletions

View file

@ -23,6 +23,20 @@ using System.Drawing;
using System.Runtime.InteropServices;
namespace GreenshotPlugin.UnmanagedHelpers {
public static class GDIExtensions {
public static bool AreRectangleCornersVisisble(this Region region, Rectangle rectangle) {
Point topLeft = new Point(rectangle.X, rectangle.Y);
Point topRight = new Point(rectangle.X + rectangle.Width, rectangle.Y);
Point bottomLeft = new Point(rectangle.X, rectangle.Y + rectangle.Height);
Point bottomRight = new Point(rectangle.X + rectangle.Width, rectangle.Y + rectangle.Height);
bool topLeftVisible = region.IsVisible(topLeft);
bool topRightVisible = region.IsVisible(topRight);
bool bottomLeftVisible = region.IsVisible(bottomLeft);
bool bottomRightVisible = region.IsVisible(bottomRight);
return topLeftVisible && topRightVisible && bottomLeftVisible && bottomRightVisible;
}
}
/// <summary>
/// GDI32 Helpers
/// </summary>