#2d #rendering

rasterize

Simple and small 2D rendering library

6 releases

Uses new Rust 2021

0.1.5 Nov 1, 2021
0.1.4 Oct 22, 2021
0.1.2 Apr 30, 2021

#29 in Rendering

Download history 5/week @ 2021-08-10 4/week @ 2021-08-17 4/week @ 2021-08-24 1/week @ 2021-08-31 7/week @ 2021-09-07 19/week @ 2021-09-14 22/week @ 2021-09-21 39/week @ 2021-09-28 7/week @ 2021-10-05 9/week @ 2021-10-12 44/week @ 2021-10-19 39/week @ 2021-10-26 27/week @ 2021-11-02 8/week @ 2021-11-09 39/week @ 2021-11-16 35/week @ 2021-11-23

113 downloads per month
Used in surf_n_term

MIT license

225KB
5.5K SLoC

Rasterizer

Build Status MIT License Crate API Docs

This is a fully functional 2D rasterizer and SVG path parser.

Features:

  • parsing SVG path format
  • rendering elliptic arc, lines, cubic/quadratic bezier curves
  • curve offsetting
  • linear and radial gradients

Usage example

There is a very simple binary in examples folder that can be used to render SVG path

$ cargo run --release --example rasterize -- paths/squirrel.path -w 512 -o squirrel.bmp

This will produce:

squirrel


lib.rs:

Simple 2D library that support SVG path parsing/generation/manipulation and rasterization.

Main features:

  • SVG path parsing and generation
  • Anit-aliased rendering
  • Path offsetting

Dependencies