Crate vg

source · []
Expand description

The VG API is (like NanoVG) loosely modeled on the HTML5 Canvas API.

The coordinate system’s origin is the top-left corner, with positive X rightwards, positive Y downwards.


pub use renderer::RenderTarget;
pub use renderer::Renderer;
pub use renderer::Command;
pub use renderer::CommandType;
pub use renderer::Drawable;
pub use renderer::ShaderType;
pub use renderer::Vertex;


Module containing renderer implementations.


Main 2D drawing context.

Struct for representing colors.

Determines how a source data is displayed against destination data.

A font handle.

Information about a font.

Image flags (eg. repeat, flip, mipmaps, etc.)

An image handle.

Information about an image.

Represents image store

Struct controlling how graphical shapes are rendered.

Represents params

A collection of verbs describing one or more contours.

Represents scissor

TextContext provides functionality for text processing in VG.

Result of a shaping run.

2×3 matrix (2 rows, 3 columns) used for 2D linear transformations.


Text horizontal alignment.

Text baseline vertical alignment.

Blend factors.

Predefined composite oprations.

Enum with all possible canvas errors that could occur.

The fill rule used when filling paths.

Reperesent glyph texture

ImageFilter allows specifying the type of filter to apply to images.

Image source

Determines the shape used to draw the end points of lines.

Determines the shape used to join two line segments where they meet.

Image format.

Used to specify Solid/Hole when adding shapes to a path.