Crate rasterize[−][src]
Simple 2D library that support SVG path parsing/generation/manipulation and rasterization.
Main features:
 SVG path parsing and generation
 Anitaliased rendering
 Path offsetting
Modules
utils  Utility functions and types used accross the library 
Structs
ActiveEdgeIter  Iterator over rasterized pixels, by activeedge rasterizer 
ActiveEdgeRasterizer  ActiveEdge rasterizer 
BBox  Bounding box with sides directed along the axes 
ColorU8  ABGR color packed as u32 value (most of the platforms are littleendian) 
Cubic  Cubic bezier curve 
CurveFlattenIter  Iterator over line segments aproximating curve segment 
EllipArc  Elliptical Arc 
GradLinear  
GradRadial  
GradStop  
GradStops  
ImageIter  
ImageMutIter  
ImageMutRef  
ImageOwned  
ImageRef  
Layer  
LinColor  Alpha premultiplied RGBA color in the liniar color space (no gamma correction) 
Line  Line segment curve 
Path  Collection of the SubPath treated as a signle unit 
PathBuilder  Path builder similar to Canvas/Cairo interface. 
Pixel  Rasterized pixel 
Point  Value representing a 2D point or vector. 
Quad  Quadratic bezier curve 
Scene  
Shape  
SignedDifferenceRasterizer  Signed difference based rasterizer 
Size  
StrokeStyle  Style used to generate stroke 
SubPath  Nonempty collections of segments where end of each segments conisides with the start of the next one. 
SvgPathParser  Path parser for SVG encoded path 
Transform  2D affine transformation 
Enums
Align  Alignment options 
FillRule  The algorithm to use to determine the inside part of a shape, when filling it. 
GradSpread  
LineCap 

LineJoin 

Segment 

SvgPathCmd  Possible SVG path commands 
SvgPathParserError  Error while parsing path in the SVG format 
Units 
Constants
DEFAULT_FLATNESS  Default flatness used during rasterizetion. Value of 0.05px gives good accuracy tradeoff. 
EPSILON  Epsilon value 
EPSILON_SQRT  Square root of the epsilon value 
PI  Mathematical pi constant 
Traits
Color  
Curve  Set of operations common to all bezier curves. 
Image  
ImageMut  
Paint  
Rasterizer  Basic rasterizer interface 
Functions
linear_to_srgb  Convert Linear RGB color component into a SRGB color component. 
scalar_fmt  Format floats in a compact way suitable for SVG path 
srgb_to_linear 
Type Definitions
CurveExtremities  Iterator containing curve extremities 
CurveRoots  Iterator containing curve roots 
Scalar  Scalar type 