Struct flo_render_canvas::CanvasRenderer[][src]

pub struct CanvasRenderer { /* fields omitted */ }
Expand description

Changes commands for flo_canvas into commands for flo_render

Implementations

Creates a new canvas renderer

Sets the viewport used by this renderer

The window width and height is the overall size of the canvas (which can be considered to have coordinates from 0,0 to window_width, window_height). The viewport, given by x and y here, is the region of the window that will actually be rendered.

The viewport and window coordinates are all in pixels. The scale used when generating transformations (so with a scale of 2, a CanvasHeight request of 1080 will act as a height 2160 in the viewport).

Returns the coordinates of the viewport, as x and y ranges

Retrieves the active transform for the canvas (which is fully up to date after rendering)

Retrieves a transformation that maps a point from canvas coordinates to viewport coordinates

Retrieves a transformation that maps a point from canvas coordinates to window coordinates

Starts processing a drawing, returning a future that completes once all of the tessellation operations have finished

Returns a stream of render actions after applying a set of canvas drawing operations to this renderer

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.