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.

Re-exports§

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

Modules§

renderer
Module containing renderer implementations.

Structs§

Canvas
Main 2D drawing context.
Color
Struct for representing colors.
CompositeOperationState
Determines how a source data is displayed against destination data.
FontId
A font handle.
FontMetrics
Information about a font.
ImageFlags
Image flags (eg. repeat, flip, mipmaps, etc.)
ImageId
An image handle.
ImageInfo
Information about an image.
ImageStore
Represents image store
Paint
Struct controlling how graphical shapes are rendered.
Path
A collection of verbs describing one or more contours.
Scissor
Represents scissor
TextContext
TextContext provides functionality for text processing in VG.
TextMetrics
Result of a shaping run.
Transform2D
2×3 matrix (2 rows, 3 columns) used for 2D linear transformations.

Enums§

Align
Text horizontal alignment.
Baseline
Text baseline vertical alignment.
BlendFactor
Blend factors.
CompositeOperation
Predefined composite oprations.
ErrorKind
Enum with all possible canvas errors that could occur.
FillRule
The fill rule used when filling paths.
GlyphTexture
Reperesent glyph texture
ImageFilter
ImageFilter allows specifying the type of filter to apply to images.
ImageSource
Image source
LineCap
Determines the shape used to draw the end points of lines.
LineJoin
Determines the shape used to join two line segments where they meet.
PixelFormat
Image format.
Solidity
Used to specify Solid/Hole when adding shapes to a path.