logo
Available on crate feature pure only.
Expand description

Draw 2D graphics for your users.

A Canvas widget can be used to draw different kinds of 2D shapes in a Frame. It can be used for animation, data visualization, game graphics, and more!

Modules

Handle events of a canvas.

Build different kinds of 2D shapes.

Structs

A simple cache that stores generated Geometry to avoid recomputation.

A widget capable of drawing 2D graphics.

The style used to fill geometry.

The frame of a Canvas.

A bunch of shapes that can be drawn.

The dash pattern used when stroking the line.

An immutable set of points that may or may not be connected.

The style of a stroke.

A bunch of text that can be drawn to a canvas

A widget capable of drawing 2D graphics.

Enums

The mouse cursor state.

A Canvas event.

The fill rule defines how to determine what is inside and what is outside of a shape.

The shape used at the end of open subpaths when they are stroked.

The shape used at the corners of paths or basic shapes when they are stroked.

Traits

The state and logic of a Canvas.

The state and logic of a Canvas.