DRIT.Drawing
Pure-managed .NET 2D graphics with a familiar drawing API and a vector-first output model. Render raster images, true vector SVG, or WMF/EMF metafiles without installing native GDI+ infrastructure.
When DRIT.Drawing fits
Choose DRIT.Drawing for server-side image generation, report and document rendering, diagram tools, thumbnails, barcode output, and applications moving from native System.Drawing.Common or libgdiplus toward a managed cross-platform graphics stack.
Capabilities
- Drawing: paths, Bézier curves, clipping, transforms, pens, solid/gradient/texture brushes, alpha blending, antialiasing, and color operations.
- Text: integrated TrueType, OpenType, CFF, Type 1, WOFF/WOFF2 fonts, fallback, rich text runs, Unicode bidi layout, and text-on-path.
- Vector model: VectorScene, RecordingGraphics, SVG reader/writer, and EMF/WMF bridging.
- Codecs: managed BMP, PNG/APNG, JPEG, GIF, TIFF, ICO, SVG, WMF, EMF, and EMF+ support.
Platform and package
Targets netstandard2.0 and net6.0. Use it from compatible .NET Framework, .NET Core/.NET 5+, Windows, Linux, macOS, ASP.NET Core, Blazor WebAssembly, and console applications. The README describes no native library or System.Drawing.Common installation requirement.
Quick start
dotnet add package DRIT.Drawing --version 26.9.1324
using var bitmap = new Bitmap(800, 600);
using var graphics = Graphics.FromImage(bitmap);
using var pen = new Pen(Color.Blue, 2);
graphics.DrawLine(pen, 0, 0, 800, 600);
bitmap.Save("output.png", ImageFormat.Png);
Next steps
- Install from NuGet
- Read the GitHub README, tests, integration tests, and MIT license
- Combine with DRIT.Barcode or DRIT.Pdf for document output
Compatibility note: printer-related types are documented as stubs. This page describes graphics and image/vector processing rather than a complete printer integration.