PeachDrawing.Svg 0.9.24

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package PeachDrawing.Svg --version 0.9.24
                    
NuGet\Install-Package PeachDrawing.Svg -Version 0.9.24
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PeachDrawing.Svg" Version="0.9.24" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PeachDrawing.Svg" Version="0.9.24" />
                    
Directory.Packages.props
<PackageReference Include="PeachDrawing.Svg" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PeachDrawing.Svg --version 0.9.24
                    
#r "nuget: PeachDrawing.Svg, 0.9.24"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PeachDrawing.Svg@0.9.24
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PeachDrawing.Svg&version=0.9.24
                    
Install as a Cake Addin
#tool nuget:?package=PeachDrawing.Svg&version=0.9.24
                    
Install as a Cake Tool

PeachDrawing.Svg

A vector SVG backend for PeachDrawing.Core: draw shapes, gradients, clips, text and images onto an SvgCanvas and save the result as an SVG document, with no HTML, CSS or PDF involved. It is the sibling of the PDF writer (PeachDrawing.PDF) and the raster canvas (PeachDrawing), and keeps everything SVG can express as vector content: paths keep their curves, gradients stay gradients, clips stay clips, glyphs are exact outlines (or selectable <text> with an embedded subset font on request), and PNG/JPEG/GIF/WebP images are embedded as they came.

dotnet add package PeachDrawing.Svg

Status: pre-1.0. SvgRenderContext, SvgComposer and SvgCanvas are the package's public surface, and it is versioned in lockstep with PeachPDF (the same number for every release); until 1.0 the API may change between releases.

using PeachDrawing.Core;
using PeachDrawing.Svg;

var context = new SvgRenderContext();
var composer = new SvgComposer(context, widthPoints: 400, heightPoints: 200);

var canvas = composer.Canvas;
canvas.DrawRectangle(context.GetSolidBrush(PaintColor.FromArgb(255, 30, 144, 255)), 20, 20, 200, 100);

await using var file = File.Create("out.svg");
composer.Save(file);

Units are points with the origin at the top left and y growing downwards, as in PeachDrawing.PDF. The only content that is not vector is what SVG cannot express: an effect a caller asks for as a bitmap (BeginRasterSurface) is embedded as a PNG.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.25-preview1 40 10/27/2026
0.9.24 83 10/23/2026