pub enum DrawCommand {
Show 26 variants ClearScreen, ClearToColor { color: RGBA, }, SetTarget { console: usize, }, Set { pos: Point, color: ColorPair, glyph: FontCharType, }, 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: FontCharType, }, 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: PointF, z_order: i32, rotation: Radians, color: ColorPair, glyph: FontCharType, scale: PointF, },
}
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
color: ColorPair
glyph: FontCharType

SetBackground

Fields

pos: Point
bg: RGBA

Print

Fields

pos: Point
text: String

PrintColor

Fields

pos: Point
text: String
color: ColorPair

PrintRight

Fields

pos: Point
text: String

PrintColorRight

Fields

pos: Point
text: String
color: ColorPair

PrintCentered

Fields

y: i32
text: String

PrintColorCentered

Fields

y: i32
text: String
color: ColorPair

PrintCenteredAt

Fields

pos: Point
text: String

PrintColorCenteredAt

Fields

pos: Point
text: String
color: ColorPair

Printer

Fields

pos: Point
text: String
align: TextAlign
background: Option<RGBA>

Box

Fields

pos: Rect
color: ColorPair

HollowBox

Fields

pos: Rect
color: ColorPair

DoubleBox

Fields

pos: Rect
color: ColorPair

HollowDoubleBox

Fields

pos: Rect
color: ColorPair

FillRegion

Fields

pos: Rect
color: ColorPair
glyph: FontCharType

BarHorizontal

Fields

pos: Point
width: i32
n: i32
max: i32
color: ColorPair

BarVertical

Fields

pos: Point
height: i32
n: i32
max: i32
color: ColorPair

SetClipping

Fields

clip: Option<Rect>

SetFgAlpha

Fields

alpha: f32

SetBgAlpha

Fields

alpha: f32

SetAllAlpha

Fields

fg: f32
bg: f32

SetFancy

Fields

position: PointF
z_order: i32
rotation: Radians
color: ColorPair
glyph: FontCharType
scale: PointF

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. 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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.