mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-24 01:00:27 +12: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
|
@ -27,6 +27,7 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
@ -43,7 +44,8 @@ public Image CaptureWindowTransparent(IntPtr handle)
|
|||
if (CaptureShadow && !NativeMethods.IsZoomed(handle) && NativeMethods.IsDWMEnabled())
|
||||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue