Enum DrawCommand

Source
pub enum DrawCommand {
Show 26 variants ClearScreen, ClearToColor { color: RGBA, }, SetTarget { console: usize, }, Set { pos: Point, color: ColorPair, glyph: u16, }, SetBackground { pos: Point, bg: RGBA, }, Print { pos: Point, text: String, }, PrintColor { pos: Point, text: String, color: ColorPair, }, PrintRight { pos: Point, text: String, }, PrintColorRight { pos: Point, text: String, color: ColorPair, }, PrintCentered { y: i32, text: String, }, PrintColorCentered { y: i32, text: String, color: ColorPair, }, PrintCenteredAt { pos: Point, text: String, }, PrintColorCenteredAt { pos: Point, text: String, color: ColorPair, }, Printer { pos: Point, text: String, align: TextAlign, background: Option<RGBA>, }, Box { pos: Rect, color: ColorPair, }, HollowBox { pos: Rect, color: ColorPair, }, DoubleBox { pos: Rect, color: ColorPair, }, HollowDoubleBox { pos: Rect, color: ColorPair, }, FillRegion { pos: Rect, color: ColorPair, glyph: u16, }, BarHorizontal { pos: Point, width: i32, n: i32, max: i32, color: ColorPair, }, BarVertical { pos: Point, height: i32, n: i32, max: i32, color: ColorPair, }, SetClipping { clip: Option<Rect>, }, SetFgAlpha { alpha: f32, }, SetBgAlpha { alpha: f32, }, SetAllAlpha { fg: f32, bg: f32, }, SetFancy { position: Vec2, z_order: i32, rotation: Radians, color: ColorPair, glyph: u16, scale: Vec2, },
}
Expand description

Represents a buffered drawing command that can be asynchronously submitted to the drawing buffer, for application at the end of the frame.

Variants§

§

ClearScreen

§

ClearToColor

Fields

§color: RGBA
§

SetTarget

Fields

§console: usize
§

Set

Fields

§pos: Point
§glyph: u16
§

SetBackground

Fields

§pos: Point
§bg: RGBA
§

Print

Fields

§pos: Point
§text: String
§

PrintColor

Fields

§pos: Point
§text: String
§

PrintRight

Fields

§pos: Point
§text: String
§

PrintColorRight

Fields

§pos: Point
§text: String
§

PrintCentered

Fields

§text: String
§

PrintColorCentered

Fields

§text: String
§

PrintCenteredAt

Fields

§pos: Point
§text: String
§

PrintColorCenteredAt

Fields

§pos: Point
§text: String
§

Printer

Fields

§pos: Point
§text: String
§background: Option<RGBA>
§

Box

Fields

§pos: Rect
§

HollowBox

Fields

§pos: Rect
§

DoubleBox

Fields

§pos: Rect
§

HollowDoubleBox

Fields

§pos: Rect
§

FillRegion

Fields

§pos: Rect
§glyph: u16
§

BarHorizontal

Fields

§pos: Point
§width: i32
§max: i32
§

BarVertical

Fields

§pos: Point
§height: i32
§max: i32
§

SetClipping

Fields

§clip: Option<Rect>
§

SetFgAlpha

Fields

§alpha: f32
§

SetBgAlpha

Fields

§alpha: f32
§

SetAllAlpha

Fields

§fg: f32
§bg: f32
§

SetFancy

Fields

§position: Vec2
§z_order: i32
§rotation: Radians
§glyph: u16
§scale: Vec2

Trait Implementations§

Source§

impl Clone for DrawCommand

Source§

fn clone(&self) -> DrawCommand

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.