mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Added draw method with image parameter
This commit is contained in:
parent
ab2ff517fb
commit
e589293637
1 changed files with 11 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue