mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
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:
parent
15d5bb58e4
commit
f63d4ca06e
5 changed files with 200 additions and 25 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue