Coder Social home page Coder Social logo

myd7349 / sharpvectors Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elinamllc/sharpvectors

0.0 1.0 0.0 138.55 MB

SharpVectors - SVG# Reloaded: SVG DOM and Rendering in C# for the .Net.

Home Page: https://github.com/ElinamLLC/SharpVectors/

License: BSD 3-Clause "New" or "Revised" License

JavaScript 2.13% C# 93.91% CSS 1.12% Visual Basic .NET 2.84%

sharpvectors's Introduction

Project Description

The Scalable Vector Graphics (SVG) is an XML-based standard file format for creating graphics on the web, and is supported by most modern browsers. This project provides a C# library for parsing, converting and viewing the SVG files in WPF applications.

The Scalable Vector Graphics (SVG) is now natively supported in most internet browsers, including the IE 9. With the HTML5, the use of the SVG as graphics format on the web is increasing.

For .NET application developers, there is currently no library complete enough to handle SVG files. Even the commercial tools are either not available or not complete enough to handle most uses of the SVG in Windows Presentation Foundation (WPF) applications. The project does not aim to provide a complete implementation of the SVG file format, but will support the features required in an average graphics application.

The SVG specification is available in HTML format or the PDF format.

Features and Uses

In general, the following features are implemented:

  • Parsing of the SVG files to create the SVG DOM
  • SVG to XAML conversion
  • A small runtime library to handle font URI, embedded images and others when using the XAML files directly from disk.
  • An optimized XAML output.
  • A simple and basic SVG viewer (an advanced viewer is planned).
  • Interaction with the conversion process (by a visitor pattern) to allow for custom hyper-link implementations, font substitutions etc.

NOTE: Only Geometry/Drawing level elements are exported, which will not work with Silverlight. See the Documentation section for more information on the features.

Installation

The SharpVectors library targets the following 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 5.0
  • .NET 6.0

The library can be used in WPF and Windows Forms applications.

For the Library

The library can be downloaded from the following sources

  • 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.

Documentation

An introduction and a tutorial with sample are available. See the Documentation section for more information.

Sample Applications

The library includes a number of sample application for both WPF and GDI+. Here are some of them:

WPF Test Application

This is an application for browsing directory (recursively) of SVG files.

WPF W3C Test Suite

This is an application for viewing the W3C Test Suite compliant results. It has two panes: top and bottom. The top pane is the generated WPF output, the bottom pane is the W3C expected output image. By the test results, this is the most complete SVG reader for WPF!

GDI+ W3C Test Suite

This is an application for viewing the W3C Test Suite compliant results. It has two panes: top and bottom. The top pane is the generated GDI+ output, the bottom pane is the W3C expected output image.

Tutorial Samples

A number of tutorial samples are available in the TutorialSamples folder.

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

Related Projects

The following are related SVG viewer projects for the .NET platforms

Related Repositories

The following are related SharpVectors repositories

  • SvgTestSuites : The W3C Test Suite files used by the SharpVectors for testing.
  • SvgXaml : SharpVectors based SVG to XAML converter application.
  • SvgViewer : SharpVectors based SVG viewer application.

sharpvectors's People

Contributors

paulushub avatar mihailskuzminsdg avatar lucapassarella avatar yavor87 avatar guillaumesmartliberty avatar mmatriccino avatar ruslanfedoseenko avatar mb-jp avatar mihailskuzmins avatar akindle avatar bjn-a avatar ciplogic avatar mp-arx avatar ravenpride avatar grayed avatar myd7349 avatar polar-slon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.