mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-02 18:26:27 +13:00
Fix OnDrawFinal issues
This commit is contained in:
parent
18cbe0b72c
commit
d3295a412a
3 changed files with 21 additions and 15 deletions
|
@ -77,9 +77,10 @@ public override void OnDrawFinal(Graphics g, Bitmap bmp)
|
|||
{
|
||||
if (BlurRadius > 1)
|
||||
{
|
||||
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
|
||||
rect.Intersect(Rectangle);
|
||||
Rectangle rect = Rectangle.Intersect(new Rectangle(0, 0, bmp.Width, bmp.Height), Rectangle);
|
||||
|
||||
if (!rect.IsEmpty)
|
||||
{
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
|
@ -89,4 +90,5 @@ public override void OnDrawFinal(Graphics g, Bitmap bmp)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -75,9 +75,10 @@ public override void OnDrawOverlay(Graphics g)
|
|||
|
||||
public override void OnDrawFinal(Graphics g, Bitmap bmp)
|
||||
{
|
||||
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
|
||||
rect.Intersect(Rectangle);
|
||||
Rectangle rect = Rectangle.Intersect(new Rectangle(0, 0, bmp.Width, bmp.Height), Rectangle);
|
||||
|
||||
if (!rect.IsEmpty)
|
||||
{
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
|
@ -86,4 +87,5 @@ public override void OnDrawFinal(Graphics g, Bitmap bmp)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -77,9 +77,10 @@ public override void OnDrawFinal(Graphics g, Bitmap bmp)
|
|||
{
|
||||
if (PixelSize > 1)
|
||||
{
|
||||
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
|
||||
rect.Intersect(Rectangle);
|
||||
Rectangle rect = Rectangle.Intersect(new Rectangle(0, 0, bmp.Width, bmp.Height), Rectangle);
|
||||
|
||||
if (!rect.IsEmpty)
|
||||
{
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
|
@ -89,4 +90,5 @@ public override void OnDrawFinal(Graphics g, Bitmap bmp)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue