Struct flo_canvas::DrawingTarget[][src]

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

A drawing target sends drawing instructions to a DrawStream

flo_draw provides two structures for sending drawing instructions to other part of the application. DrawingTarget is used when the instructions do not need to be retained: eg, when rendering to a window or to an offscreen target.

See Canvas for a structure that can store drawing instructions as well as send them to a target.

Implementations

Creates a new drawing target and a stream that can be used to read the instructions sent to it

Sends some drawing instructions to this target

Provides a way to draw on this target via a graphics context

Sends the results of a future to this target

Trait Implementations

A drawing context can be cloned in order to create multiple sources for a single drawing target.

This is particularly useful when combined with layers: multiple threads can draw to different layers without interfering with each other, so it’s possible to design renderers where the rendering instructions have multiple sources (see the mandelbrot example for an example of where this is used)

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Executes the destructor for this type. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.