Aspose.Drawing for .NET is a cross-platform 2D drawing engine with System.Drawing compatible API. Drawing library supports rendering vector graphics such as lines, curves, and figures as well as text in a variety of fonts, sizes, and styles onto raster images. Images can be saved in all commonly used graphics formats including BMP, PNG, JPEG, GIF, and TIFF. Aspose.Drawing is a pure .NET library and does not rely on any external native rendering engine.
At a Glance
An overview of Aspose.Drawing for .NET API.
- Draw Lines and Curves
- Draw Shapes
- Uses Pens
- Use Brushes
- Render Text
- Use Different Fonts
- Global and Local
- Create bitmaps
- Load Images
- Save Images
- Alpha blending
Aspose.Drawing for .NET supports .NET Framework version 2.0, .NET Core 2.0 or later.
Supported File Formats
Aspose.Drawing for .NET supports the following image formats.
Advanced .NET Graphics API Features
Creating bitmaps from scratch or load existing files
Draw lines, curves, splines and arcs
Draw shapes like rectangle, polygon, ellipse, etc
Process and draw graphics paths
Render text with different fonts and styles
Use different pen widths and styles
Use solid, texture, gradient, and hatch brushes
Supports alpha blending and anti-aliasing
Work with clip regions
Use coordinate system transformations
Draw Vector Graphics
Aspose.Drawing for .NET allows to draw different vector graphics such as arcs, Cardinal Spline, Bezier spline, ellipses, closed curves, lines and a number of other types. Only few lines of code needed to draw different types of vector graphics using the API. e.g here is code for drawing arc.
Drawing Arc - C#
Bitmap bitmap = new Bitmap(1000, 800, System.Drawing.Imaging.PixelFormat.Format32bppPArgb); Graphics graphics = Graphics.FromImage(bitmap); Pen pen = new Pen(Color.FromKnownColor(KnownColor.Blue), 2); graphics.DrawArc(pen, 0, 0, 700, 700, 0, 180); bitmap.Save(@"dirpath\LinesCurvesShapes\DrawArc_out.png");