Enum flo_canvas::Draw [] [src]

pub enum Draw {
    NewPath,
    Move(f32f32),
    Line(f32f32),
    BezierCurve((f32, f32)(f32, f32)(f32, f32)),
    ClosePath,
    Fill,
    Stroke,
    LineWidth(f32),
    LineWidthPixels(f32),
    LineJoin(LineJoin),
    LineCap(LineCap),
    NewDashPattern,
    DashLength(f32),
    DashOffset(f32),
    FillColor(Color),
    StrokeColor(Color),
    BlendMode(BlendMode),
    IdentityTransform,
    CanvasHeight(f32),
    CenterRegion((f32, f32)(f32, f32)),
    MultiplyTransform(Transform2D),
    Unclip,
    Clip,
    Store,
    Restore,
    FreeStoredBuffer,
    PushState,
    PopState,
    ClearCanvas,
    Layer(u32),
    LayerBlend(u32BlendMode),
    ClearLayer,
}

Instructions for drawing to a canvas

Variants

Begins a new path

Move to a new point

Line to point

Bezier curve to point

Closes the current path

Fill the current path

Draw a line around the current path

Set the line width

Set the line width in pixels

Line join

The cap to use on lines

Resets the dash pattern to empty (which is a solid line)

Adds a dash to the current dash pattern

Sets the offset for the dash pattern

Set the fill color

Set the line color

Set how future renderings are blended with one another

Reset the transformation to the identity transformation

Sets a transformation such that: (0,0) is the center point of the canvas (0,height/2) is the top of the canvas Pixels are square

Moves a particular region to the center of the canvas (coordinates are minx, miny, maxx, maxy)

Multiply a 2D transform into the canvas

Unset the clipping path

Clip to the currently set path

Stores the content of the clipping path from the current layer in a background buffer

Restores what was stored in the background buffer. This should be done on the same layer that the Store operation was called upon.

The buffer is left intact by this operation so it can be restored again in the future.

(If the clipping path has changed since then, the restored image is clipped against the new path)

Releases the buffer created by the last 'Store' operation

Restore will no longer be valid for the current layer

Push the current state of the canvas (line settings, stored image, current path - all state)

Restore a state previously pushed

Clears the canvas entirely

Selects a particular layer for drawing Layer 0 is selected initially. Layers are drawn in order starting from 0. Layer IDs don't have to be sequential.

Sets how a particular layer is blended with the underlying layer

Clears the current layer

Trait Implementations

impl<'a, Coord: Coordinate2D + Coordinate, Curve: BezierCurve<Point = Coord>> From<&'a Curve> for Draw
[src]

[src]

Performs the conversion.

impl Clone for Draw
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Draw
[src]

impl PartialEq for Draw
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for Draw
[src]

[src]

Formats the value using the given formatter. Read more

impl CanvasEncoding<String> for Draw
[src]

[src]

Encodes this item by appending it to the specified string Read more

Auto Trait Implementations

impl Send for Draw

impl Sync for Draw