#2d #rendering

rasterize

Simple and small 2D rendering library

13 releases

Uses new Rust 2021

new 0.2.1 May 20, 2022
0.2.0 May 12, 2022
0.1.10 Feb 28, 2022
0.1.9 Jan 14, 2022
0.1.2 Apr 30, 2021

#19 in Rendering

Download history 9/week @ 2022-01-29 2/week @ 2022-02-05 6/week @ 2022-02-12 13/week @ 2022-02-19 34/week @ 2022-02-26 13/week @ 2022-03-05 37/week @ 2022-03-12 45/week @ 2022-03-19 2/week @ 2022-03-26 5/week @ 2022-04-02 12/week @ 2022-04-09 3/week @ 2022-04-16 26/week @ 2022-04-23 60/week @ 2022-04-30 100/week @ 2022-05-07 216/week @ 2022-05-14

407 downloads per month
Used in surf_n_term

MIT license

250KB
6.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 -- data/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
  • Anti-aliased rendering
  • Path offsetting

Dependencies

~1.4–2.4MB
~50K SLoC