ImageSharp.Drawing

2D Polygon and text drawing extensions for ImageSharp.

Install anywhere

ImageSharp.Drawing carries no native dependencies and can be installed anywhere that supports .NET Standard 1.3+, ImageSharp.Drawing can be used in device, cloud, and embedded/IoT scenarios.

PM > Install-Package SixLabors.ImageSharp.Drawing -PreRelease

An API for everyone

ImageSharp.Drawings's API is unparalleled for it's ease of use; designed from the ground up to be flexible and extensible. Easily draw complex shapes with our intuitive commands.

using SixLabors.ImageSharp.Drawing.Processing;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;

using Image image = new Image<Rgba32>(100, 100);
var star = new Star(50, 50, 5, 20, 45);
PointF[] points = star.Points.ToArray();
Color[] colors =
{
    Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple,
    Color.Red, Color.Yellow, Color.Green, Color.Blue, Color.Purple
};

var brush = new PathGradientBrush(points, colors, Color.White);

image.Mutate(x => x.Fill(brush)); 
image.Save("star.png");