mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 13:10:22 +12:00
Fix OnDrawFinal issues
This commit is contained in:
parent
18cbe0b72c
commit
d3295a412a
|
@ -77,14 +77,16 @@ 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);
|
||||
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
if (!rect.IsEmpty)
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
|
||||
g.DrawImage(croppedImage, rect);
|
||||
g.DrawImage(croppedImage, rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,14 +75,16 @@ 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);
|
||||
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
if (!rect.IsEmpty)
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
|
||||
g.DrawImage(croppedImage, rect);
|
||||
g.DrawImage(croppedImage, rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,14 +77,16 @@ 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);
|
||||
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
if (!rect.IsEmpty)
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
using (Bitmap croppedImage = ImageHelpers.CropBitmap(bmp, rect))
|
||||
{
|
||||
ApplyEffect(croppedImage);
|
||||
|
||||
g.DrawImage(croppedImage, rect);
|
||||
g.DrawImage(croppedImage, rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue