Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 16, 2022 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/6b68c9e99c318d63379890e37b243e38 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/6b68c9e99c318d63379890e37b243e38 to your computer and use it in GitHub Desktop.
Using System.Drawing with .NET 6 on non-Windows Platform | Aspose.Drawing in macOS, Linux
using System.Drawing;
using System.Drawing.Drawing2D;
Aspose.Drawing.License license = new Aspose.Drawing.License();
license.SetLicense("Aspose.Drawing.NET.lic");
Bitmap bitmap = new Bitmap(1000, 800);
Graphics graphics = Graphics.FromImage(bitmap);
graphics.SmoothingMode = SmoothingMode.HighQuality;
Brush brush = new LinearGradientBrush(new Point(0, 0), new Point(1000, 800), Color.Red, Color.Blue);
graphics.FillEllipse(brush, 100, 100, 800, 600);
bitmap.Save("gradient.png");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment