mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
fixed #2192: Instead of all screen bounds, instead use intersected screen bounds when cropping outside area
This commit is contained in:
parent
29a8572f68
commit
3f10f9ec49
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,7 @@ You should have received a copy of the GNU General Public License
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Drawing.Imaging;
|
using System.Drawing.Imaging;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
@ -43,7 +44,8 @@ public Image CaptureWindowTransparent(IntPtr handle)
|
||||||
if (CaptureShadow && !NativeMethods.IsZoomed(handle) && NativeMethods.IsDWMEnabled())
|
if (CaptureShadow && !NativeMethods.IsZoomed(handle) && NativeMethods.IsDWMEnabled())
|
||||||
{
|
{
|
||||||
rect.Inflate(ShadowOffset, ShadowOffset);
|
rect.Inflate(ShadowOffset, ShadowOffset);
|
||||||
rect.Intersect(CaptureHelpers.GetScreenBounds());
|
Rectangle intersectBounds = Screen.AllScreens.Select(x => x.Bounds).Where(x => x.IntersectsWith(rect)).Combine();
|
||||||
|
rect.Intersect(intersectBounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bitmap whiteBackground = null, blackBackground = null, whiteBackground2 = null;
|
Bitmap whiteBackground = null, blackBackground = null, whiteBackground2 = null;
|
||||||
|
|
Loading…
Reference in a new issue