mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 13:10:22 +12:00
Added draw method with image parameter
This commit is contained in:
parent
ab2ff517fb
commit
e589293637
|
@ -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)
|
public Bitmap CreateGradientPreview(int width, int height, bool border = false, bool checkers = false)
|
||||||
{
|
{
|
||||||
Bitmap bmp = new Bitmap(width, height);
|
Bitmap bmp = new Bitmap(width, height);
|
||||||
|
|
Loading…
Reference in a new issue