Enum pixel_widgets::draw::Command[][src]

pub enum Command {
    Nop,
    Clip {
        scissor: Rectangle,
    },
    Colored {
        offset: usize,
        count: usize,
    },
    Textured {
        texture: usize,
        offset: usize,
        count: usize,
    },
}
Expand description

A draw Command that is to be translated to a draw command specific to the backend

Variants

Nop

Do nothing. Appending a Nop to another command will flush the other command.

Clip

Sets a new scissor rect, which is used to confine geometry to a certain area on screen.

Fields of Clip

scissor: Rectangle

The scissor rectangle

Colored

Draw a list of vertices without an active texture

Fields of Colored

offset: usize

Offset in vertices from the start of the vertex buffer

count: usize

The number of vertices to draw

Textured

Draw a list of vertices with the active texture denoted by it’s index

Fields of Textured

texture: usize

Texture id to be used

offset: usize

Offset in vertices from the start of the vertex buffer

count: usize

The number of vertices to draw

Implementations

Append another Command to this Command. If the Commands can be chained together the Command is extended and None is returned, but if the Commands can not be chained the new command is returned again.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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 alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.