Giter VIP home page Giter VIP logo

svg-path's Introduction

svg-path

svg-path is a simple, dependencyless library for composing SVG path data strings, intended for use in Rust-based frontend frameworks and tools that output SVG. It consists of a single type, Path, which supports a simple and type-safe builder-like syntax for appending path commands, and implements Display for conversion into the SVG syntax.

Path also includes helper methods for producing certain common path shapes that can be nontrivial to express directly (currently just Path::partial_circle).

Future plans

Considerations for the future of this library, depending on demand, include:

  • Support for concatenation of Path objects
  • Support for passing data types other than f32 for command values
  • First-class treatment of commands with a PathCommand enum of some sort.
  • Support for parsing Path objects from strings (likely behind a feature, since this would probably mean introducing dependencies.)

Alternatives and related projects

  • svgtypes, a library with parsers and composers for many SVG data types (but not the XML syntax itself).
  • svg_minimal, a similarly minimal path-focused SVG library
  • svg, a full SVG composer and parser
  • nsvg, a Rust wrapper for the NanoSVG C library.
  • rsvg, Rust bindings to the rsvg library
  • resvg, a Rust SVG renderer
  • lyon_path, a library with an SVG-inspired path data structure

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.