PeachDrawing.Core
0.9.21
dotnet add package PeachDrawing.Core --version 0.9.21
NuGet\Install-Package PeachDrawing.Core -Version 0.9.21
<PackageReference Include="PeachDrawing.Core" Version="0.9.21" />
<PackageVersion Include="PeachDrawing.Core" Version="0.9.21" />
<PackageReference Include="PeachDrawing.Core" />
paket add PeachDrawing.Core --version 0.9.21
#r "nuget: PeachDrawing.Core, 0.9.21"
#:package PeachDrawing.Core@0.9.21
#addin nuget:?package=PeachDrawing.Core&version=0.9.21
#tool nuget:?package=PeachDrawing.Core&version=0.9.21
PeachDrawing.Core
The drawing-surface abstraction PeachPDF targets to write PDF, published as its own package so
other renderers can target it too: a Canvas to draw shapes, text and images on, a RenderContext to resolve colours,
fonts and paint objects from, and the paint-ready value types (Brush, Pen, GraphicsPath, PaintColor, Rect and the
rest) that connect them. Its only dependency is PeachDrawing.Text, for
font and typeface types. It is trimmable and Native AOT compatible.
dotnet add package PeachDrawing.Core
Status: pre-1.0. Every type in the package is documented public API, and it is versioned in lockstep with PeachPDF (the
same number for every release); until 1.0 the API may change between releases. Two implementations of Canvas exist today:
PeachPDF's own, which writes PDF, and PeachDrawing, a standalone CPU
software rasterizer you can use with no PeachPDF reference at all.
What is in it:
Canvas: clip, transform and blend-mode stacks, and drawing of rectangles, polygons, paths, lines, shaped text and images (with opacity, blending, colour-matrix and mask variants), plus layers with blur, drop-shadow and colour-matrix effects, tiles for content drawn once and reused, and tagged-PDF structure hooks that a backend with no such notion can ignore.RenderContext: the per-render factory that resolves fonts (installed,@font-face-style URLs and local faces, with per-codepoint CSS Fonts 4 fallback) and builds brushes and pens, including linear, radial and conic gradients.- Plain-data paint objects:
Brush,PenandGraphicsPathare readable data rather than backend-owned handles, so aCanvasyou write yourself can interpret what another implementation built without reaching into its internals. - Colour glyphs and paragraphs: a walker that paints COLR v0/v1 colour glyphs onto any
Canvas, and extension methods that draw aPeachDrawing.Textparagraph layout or shaped glyph run on anyCanvas.
using PeachDrawing.Core;
// Any concrete Canvas / RenderContext: PeachPDF's, PeachDrawing's RasterCanvas, or your own.
canvas.PushClip(new Rect(0, 0, 200, 100));
canvas.DrawRectangle(context.GetSolidBrush(PaintColor.FromArgb(255, 30, 144, 255)), x: 10, y: 10, width: 180, height: 80);
canvas.DrawString("Hello", font, PaintColor.Black, new PaintPoint(20, 40), new Size(160, 20));
canvas.PopClip();
See the PeachDrawing.Core guide for the full tour, including how to implement
your own Canvas.
Sponsorship
PeachPDF is free and open source. If it saves you time, you can sponsor jhaygood86 on GitHub; sponsors can get paid support, see Sponsorship.
Licence
BSD 3-Clause (see LICENSE).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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. net11.0 is compatible. |
-
net10.0
- PeachDrawing.Text (>= 0.9.21)
-
net11.0
- PeachDrawing.Text (>= 0.9.21)
-
net8.0
- PeachDrawing.Text (>= 0.9.21)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on PeachDrawing.Core:
| Package | Downloads |
|---|---|
|
PeachPDF
Renders HTML and CSS to PDF in pure .NET, with no browser or external process: HTML parsing, the CSS cascade, layout, SVG, MathML and the PDF writer all run in-process. |
|
|
PeachDrawing
A standalone software raster Canvas for PeachDrawing.Core - draw shapes, text and images onto a bitmap and save it in any PeachImage-supported format, with no PDF, HTML or CSS involved. This is also the raster fallback PeachPDF itself uses for effects PDF cannot express in vector form (filters, shadows, backdrop effects). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.21 | 27 | 10/2/2026 |