Coder Social home page Coder Social logo

verg's Introduction

CI

Verg

This is a small, simple vector graphics rendering library. Its goal is to be simple to use and easy to embed in existing projects. It doesn't necessarily want to implement a lot of features. Currently supported things are:

  • Rendering quadratic and cubic Bézier curves
  • Gradients: linear, radial, conic
  • Porter-Duff blending

Here are some demos rendered with the library:

Glyph @ The name of the library rendered with the library itself FMI text Linear, radial and conic gradients

The focus is more on the quality of the renderer rather than the number of features it supports. The work is based on Raph Levien's font-rs (more precisely: the line rendering algorithm). Rendering of quadratic Bézier curves is also based on Raph Levien's work: Flattening Quadratic Bézier Curves. Cubics are rendered using De Casteljau subdivision: Piecewise Linear Approximationof Bézier Curves.

Setting up a development environment

You can check scripts/shell.nix (even if you don't use nix) to see the dependencies that are needed (all of them can be gathered with rustup). Unfortunately the shell.nix is clutteret with ghc and latex even though they're not needed for running the examples, they are there because this is my bachelor's thesis at the same time, and I use them for documentation/testing stuff.

To run the project's tests:

cargo test --all-features

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.