diff --git a/ShareX.HelpersLib/Colors/GradientInfo.cs b/ShareX.HelpersLib/Colors/GradientInfo.cs index 7136afa5c..1972677d5 100644 --- a/ShareX.HelpersLib/Colors/GradientInfo.cs +++ b/ShareX.HelpersLib/Colors/GradientInfo.cs @@ -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);