Crate rasterize[][src]

Expand description

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

Main features:

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

Modules

Utility functions and types used accross the library

Structs

Iterator over rasterized pixels, by active-edge rasterizer

Active-Edge rasterizer

Bounding box with sides directed along the axes

ABGR color packed as u32 value (most of the platforms are little-endian)

Cubic bezier curve

Iterator over line segments aproximating curve segment

Elliptical Arc

Alpha premultiplied RGBA color in the liniar color space (no gamma correction)

Line segment curve

Collection of the SubPath treated as a signle unit

Path builder similar to Canvas/Cairo interface.

Rasterized pixel

Value representing a 2D point or vector.

Quadratic bezier curve

Signed difference based rasterizer

Style used to generate stroke

Non-empty collections of segments where end of each segments conisides with the start of the next one.

Path parser for SVG encoded path

2D affine transformation

Enums

Alignment options

The algorithm to use to determine the inside part of a shape, when filling it.

LineCap specifies the shape to be used at the end of open subpaths when they are stroked. See SVG specification for more details.

LineJoin defines the shape to be used at the corners of paths when they are stroked. See SVG specification for more details.

Segment is an enum of either Line, Quad or Cubic

Possible SVG path commands

Error while parsing path in the SVG format

Constants

Default flatness used during rasterizetion. Value of 0.05px gives good accuracy tradeoff.

Epsilon value

Square root of the epsilon value

Mathematical pi constant

Traits

Set of operations common to all bezier curves.

Basic rasterizer interface

Functions

Convert Linear RGB color component into a SRGB color component.

Format floats in a compact way suitable for SVG path

Type Definitions

Iterator containing curve extremities

Iterator containing curve roots

Scalar type