ImageExtensions - Remove GraphicsUnit argument from 'GetArea'

This commit is contained in:
miku-666
2023-04-09 19:23:59 +02:00
parent 9d3104fe96
commit 7ec2a70ee0

View File

@@ -32,7 +32,7 @@ namespace PckStudio.Extensions
}
}
public static Image GetArea(this Image source, Rectangle area, GraphicsUnit unit = GraphicsUnit.Pixel)
public static Image GetArea(this Image source, Rectangle area)
{
Image tileImage = new Bitmap(area.Width, area.Height);
using (Graphics gfx = Graphics.FromImage(tileImage))
@@ -40,7 +40,7 @@ namespace PckStudio.Extensions
gfx.SmoothingMode = SmoothingMode.None;
gfx.InterpolationMode = InterpolationMode.NearestNeighbor;
gfx.PixelOffsetMode = PixelOffsetMode.HighQuality;
gfx.DrawImage(source, new Rectangle(Point.Empty, area.Size), area, unit);
gfx.DrawImage(source, new Rectangle(Point.Empty, area.Size), area, GraphicsUnit.Pixel);
}
return tileImage;
}