Added draw method with image parameter

This commit is contained in:
Jaex 2020-08-09 05:46:36 +03:00
parent ab2ff517fb
commit e589293637

View file

@ -127,6 +127,17 @@ public void Draw(Graphics g, Rectangle rect)
}
}
public void Draw(Image img)
{
if (IsValid)
{
using (Graphics g = Graphics.FromImage(img))
{
Draw(g, new Rectangle(0, 0, img.Width, img.Height));
}
}
}
public Bitmap CreateGradientPreview(int width, int height, bool border = false, bool checkers = false)
{
Bitmap bmp = new Bitmap(width, height);