[][src]Crate femtovg

The femtovg 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;

Modules

renderer

Module containing renderer implementations.

Structs

Canvas

Main 2D drawing context.

Color

Struct for representing colors.

CompositeOperationState

Determines how a new ("source") data is displayed against an existing ("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.

Paint

Struct controlling how graphical shapes are rendered.

Path

A collection of verbs (move_to(), line_to(), bezier_to(), etc.) describing one or more contours.

TextMetrics

Result of a shaping run.

Transform2D

2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling.

Enums

Align

Text horizontal alignment: Left (default), Center, Right.

Baseline

Text baseline vertical alignment: Top, Middle, Alphabetic (default), Bottom.

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: EvenOdd, NonZero (default).

ImageSource

Image source

LineCap

Determines the shape used to draw the end points of lines: Butt (default), Round, Square.

LineJoin

Determines the shape used to join two line segments where they meet. Miter (default), Round, Bevel.

PixelFormat

Image format: Rgb8, Rgba8, Gray8.

Solidity

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