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.
- Composite
Operation State - Determines how a source data is displayed against destination data.
- FontId
- A font handle.
- Font
Metrics - Information about a font.
- Image
Flags - Image flags (eg. repeat, flip, mipmaps, etc.)
- ImageId
- An image handle.
- Image
Info - Information about an image.
- Image
Store - Represents image store
- Paint
- Struct controlling how graphical shapes are rendered.
- Path
- A collection of verbs describing one or more contours.
- Scissor
- Represents scissor
- Text
Context - TextContext provides functionality for text processing in VG.
- Text
Metrics - 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.
- Blend
Factor - Blend factors.
- Composite
Operation - Predefined composite oprations.
- Error
Kind - Enum with all possible canvas errors that could occur.
- Fill
Rule - The fill rule used when filling paths.
- Glyph
Texture - Reperesent glyph texture
- Image
Filter - ImageFilter allows specifying the type of filter to apply to images.
- Image
Source - Image source
- LineCap
- Determines the shape used to draw the end points of lines.
- Line
Join - Determines the shape used to join two line segments where they meet.
- Pixel
Format - Image format.
- Solidity
- Used to specify Solid/Hole when adding shapes to a path.