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

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

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

impl Command[src]

pub fn append(&mut self, command: Command) -> Option<Command>[src]

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

impl Clone for Command[src]

impl Copy for Command[src]

impl Debug for Command[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DragDropId for T where
    T: 'static + Send + Copy
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.