Introduction
The Scalable Vector Graphics (SVG) is a well-known graphics format developed and maintained by the W3C SVG Working Group. The SVG is designed to be used on the web, but the format is flexible enough for applications outside the web. Moreover, the format is exported and imported by most image editing applications, making it the ideal format for image file exchanges.
SVG is a markup language (an XML format) for describing two-dimensional graphics applications and images, and a set of related graphics script interfaces. With the script interfaces, it can be created and manipulated through JavaScript scripts.
The SharpVectors project aims to provide libraries and tools to parse, convert and view the SVG on Windows, especially on the Windows Presentation Foundation (WPF) platform.
Installation
The SharpVectors library currently targets the following .NET frameworks
- .NET Framework, Version 4.0
- .NET Framework, Version 4.5
- .NET Framework, Version 4.6
- .NET Framework, Version 4.7
- .NET Framework, Version 4.8
- .NET Standard, Version 2.1
- .NET Core, Version 3.1
- .NET 6.0 ~ .NET 8.0
The library consists of a number of shared or common components and rendering implementations for Windows Presentation Foundation (WPF) and Windows Forms applications.
For the Libraries
The library can be downloaded from the following sources
- NuGet (Full Package - WPF/GDI+), Version 1.8.4 - SharpVectors.
- NuGet (Full Package - WPF/GDI+), Version 1.8.4 - SharpVectors.Reloaded.
- NuGet (WPF Only), Version 1.8.4 - SharpVectors.Wpf.
- GitHub Releases Page, Version 1.8.4.
Note
- The SharpVectors.Reloaded package is the same as the SharpVectors, which is the recommended package if you need the full package.
- The SharpVectors.Reloaded name was used for the Nuget package at the time the SharpVectors package name was not available.
- The SharpVectors.Reloaded package name will be retired in Version 2.0.
- The SharpVectors.Wpf is the recommended package, for
WPF
only application. - As outlined in the roadmap, other packages such as the SharpVectors.Gdi for the
GDI+
, will be available as the renderers mature.
For the Applications
The following are related SharpVectors application repositories
- SvgXaml : SharpVectors based SVG to XAML converter application.
- SvgViewer : SharpVectors based SVG viewer application.
Getting Started
This section provides Getting Start information to help you get started.
Credits
SharpVectors uses source codes from articles and other open source projects. We wish to acknowledge and thank the authors of these great articles and projects
- SharpVectorGraphics (aka SVG#) by SVG# Team of Developers (SourceForge)
- WPF Zooming and Panning Control by Ashley Davis (CodeProject)
- Render Text On A Path With WPF by Charles Petzold (MSDN Magazine - December 2008)
- MinIoC by Microsoft (Single-file minimal C# IoC container)
- .NET ZLib Implementation by Alberto M (CodeProject)
- Brotli compression format by Google (C# Decoder)
Links to Resources
Overview
Scalable Vector Graphics (SVG) Specifications
- SVG 1.1 (First Edition) - This version is outdated!
- SVG 1.1 (Second Edition)
Libraries and Frameworks
- Batik SVG Toolkit, the most complete SVG toolkit available (Java).