DRIT.Drawing
26.11.1964
dotnet add package DRIT.Drawing --version 26.11.1964
NuGet\Install-Package DRIT.Drawing -Version 26.11.1964
<PackageReference Include="DRIT.Drawing" Version="26.11.1964" />
<PackageVersion Include="DRIT.Drawing" Version="26.11.1964" />
<PackageReference Include="DRIT.Drawing" />
paket add DRIT.Drawing --version 26.11.1964
#r "nuget: DRIT.Drawing, 26.11.1964"
#:package DRIT.Drawing@26.11.1964
#addin nuget:?package=DRIT.Drawing&version=26.11.1964
#tool nuget:?package=DRIT.Drawing&version=26.11.1964
DRIT.Drawing
DRIT.Drawing is a pure-managed, cross-platform 2D graphics library for .NET. It mirrors the familiar System.Drawing.Common API in the DRIT.Drawing namespace, with no native dependencies and no third-party NuGet packages.
It supports raster drawing, text and fonts, PNG/APNG, JPEG, GIF, BMP, TIFF, ICO, SVG, and WMF/EMF/EMF+ playback and recording. The vector-first VectorScene model lets the same drawing code produce bitmap, SVG, or metafile output.
Install
dotnet add package DRIT.Drawing
Get started
using DRIT.Drawing;
using DRIT.Drawing.Brushes;
using DRIT.Drawing.Colors;
using DRIT.Drawing.Imaging;
using DRIT.Drawing.Pens;
using var bitmap = new Bitmap(800, 600);
using var graphics = Graphics.FromImage(bitmap);
using var pen = new Pen(Color.Blue, 2);
using var brush = new SolidBrush(Color.Red);
graphics.DrawEllipse(pen, 100, 100, 200, 200);
graphics.FillRectangle(brush, 50, 50, 100, 100);
bitmap.Save("output.png", ImageFormat.Png);
Record vector SVG
The same drawing API can record true vector output.
using DRIT.Drawing;
using DRIT.Drawing.Colors;
using DRIT.Drawing.Imaging;
using DRIT.Drawing.Pens;
using var svg = new SvgImage(800, 600);
using var graphics = svg.CreateGraphics();
using var pen = new Pen(Color.Blue, 2);
graphics.Clear(Color.White);
graphics.DrawEllipse(pen, 100, 100, 200, 200);
svg.Save("drawing.svg", ImageFormat.Svg);
Work with animation frames
using DRIT.Drawing.Enums;
using DRIT.Drawing.Imaging;
using var image = new Bitmap("animation.gif");
for (int i = 0; i < image.GetFrameCount(FrameDimension.Time); i++)
{
image.SelectActiveFrame(FrameDimension.Time, i);
image.Save($"frame-{i}.png", ImageFormat.Png);
}
What's new in 26.11
- Improved image decoding and encoding fidelity for JPEG, PNG/APNG, GIF, BMP, TIFF, and ICO.
- Added configurable decoding limits and stricter malformed-image validation.
- Improved EMF/WMF/EMF+ interoperability, vector rendering, text layout, font fallback, and SVG output.
Examples and resources
Each guide contains runnable code and the output it produces.
Getting started: create, save, load, and dispose images; migrate from
System.Drawing; set decoding limits.Drawing: lines, shapes, arcs, curves, paths, regions, and hit testing.
Brushes and pens: solid, hatch, gradient, and texture fills; dashes, joins, and arrow caps.
Rendering: antialiasing, alpha blending, clipping, transforms, and page units.
Text and fonts: measuring and formatting text, font fallback, rich text, and text on a path.
Images: image formats, pixel access, cropping, scaling, JPEG quality, and safe decoding.
Animation: animated GIF inspection, frame extraction, and preservation.
Vector and metafiles: SVG recording and rasterization, EMF output, and comparison.
Recipes: captions, frames, callouts, charts, badges, and thumbnails.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
This package has no dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on DRIT.Drawing:
| Package | Downloads |
|---|---|
|
DRIT.Spreadsheet
DRIT.Spreadsheet is a pure-managed, cross-platform .NET library for creating, reading, and manipulating spreadsheet documents (XLSX, XLS, XLSB, CSV, TSV). It offers comprehensive spreadsheet capabilities including a formula calculation engine, charts, pivot tables, tables, conditional formatting, data validation, digital signatures (PKCS#12, XAdES-BES), AES-256 encryption, form controls, VBA macros, and PDF export — built on a clean-room implementation with minimal NuGet dependencies. |
|
|
DRIT.Pdf
DRIT.Pdf is a pure-managed, cross-platform .NET library for creating, reading, and manipulating PDF documents. It offers comprehensive PDF capabilities including AcroForms, digital signatures (PKCS#12, PKCS#11, PAdES), encryption, a full annotation hierarchy, tagged PDFs and PDF/UA, PDF/A and PDF/X conformance writing, portfolios, document comparison, and image conversion — built on a clean-room PDF 1.7/2.0 implementation with minimal NuGet dependencies. |
|
|
DRIT.Presentation
DRIT.Presentation is a pure-managed, cross-platform .NET library for creating, reading, and manipulating PowerPoint presentations (PPTX, PPTM, PPSX, PPSM, and ODP). It offers presentation processing capabilities including slides, charts, SmartArt, shapes, animations, transitions, media, digital signatures, AES-256 encryption, VBA macros, and PDF, image, SVG, and HTML export. |
|
|
DRIT.Barcode
DRIT.Barcode is a pure-managed, cross-platform .NET library for generating and recognizing barcodes across 60+ symbologies, including 1D, 2D, GS1 DataBar, postal, and complex barcodes. It provides raster and true vector SVG/EMF output through DRIT.Drawing and PDF output through DRIT.Pdf. |
|
|
DRIT.Document
DRIT.Document is a pure-managed, cross-platform .NET library for creating, reading, and manipulating Word documents (DOCX, legacy DOC, and ODT). It offers comprehensive document processing capabilities including text formatting, tables, headers/footers, mail merge, and document conversion. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.11.1964 | 0 | 11/22/2026 |
| 26.9.1324 | 768 | 9/15/2026 |
| 26.7.874 | 335 | 7/30/2026 |
- Improved image decoding and encoding fidelity for JPEG, PNG/APNG, GIF, BMP, TIFF, and ICO.
- Added configurable decoding limits and stricter malformed-image validation.
- Improved EMF/WMF/EMF+ interoperability, vector rendering, text layout, font fallback, and SVG output.