Skip to main content

Cmd

Enum Cmd 

Source
#[non_exhaustive]
pub enum Cmd { Rect { x: i32, y: i32, w: i32, h: i32, c: u32, }, RRect { x: i32, y: i32, w: i32, h: i32, r: u16, t: u16, fill: u32, stroke: u32, stroke2: u32, }, PanelFx { x: i32, y: i32, w: i32, h: i32, r: i32, t: i32, fill: u32, stroke: u32, }, Text { x: i32, y: i32, font: u16, size: i32, c: u32, maxw: i32, s: Vec<u8>, }, Icon { x: i32, y: i32, cp: u32, size: i32, c: u32, }, Image { x: i32, y: i32, w: i32, h: i32, sf: Rc<Surface>, ver: u32, }, Clip { x: i32, y: i32, w: i32, h: i32, }, Unclip, Circle { x: i32, y: i32, r: i32, t: i32, c: u32, }, Line { x0: i32, y0: i32, x1: i32, y1: i32, w: i32, c: u32, }, Custom { x: i32, y: i32, w: i32, h: i32, f: Option<DrawRef>, user: usize, ver: u32, }, Shadow { x: i32, y: i32, w: i32, h: i32, r: i32, depth: i32, c: u32, }, }
Expand description

one recorded draw command [C_*]

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Rect

Fields

§

RRect

fill (alpha 0 = none), border t px in stroke, its bottom band in stroke2; r and t are kept as u16

Fields

§fill: u32
§stroke: u32
§stroke2: u32
§

PanelFx

Fractional rounded panel; geometry is 24.8 pixels and composited once.

Fields

§fill: u32
§stroke: u32
§

Text

text with baseline y; maxw != 0 clips it to x .. x + maxw

Fields

§font: u16
§size: i32
§maxw: i32
§s: Vec<u8>
§

Icon

icon, em box top-left at x, y

Fields

§cp: u32
§size: i32
§

Image

Fields

§ver: u32
§

Clip

Fields

§

Unclip

§

Circle

24.8; t = 0 fills

Fields

§

Line

24.8, round caps

Fields

§x0: i32
§y0: i32
§x1: i32
§y1: i32
§

Custom

Fields

§user: usize
§ver: u32
§

Shadow

Fields

§depth: i32

Trait Implementations§

Source§

impl Clone for Cmd

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Cmd

§

impl !Send for Cmd

§

impl !Sync for Cmd

§

impl !UnwindSafe for Cmd

§

impl Forget for Cmd

§

impl Freeze for Cmd

§

impl Unpin for Cmd

§

impl UnsafeUnpin for Cmd

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> ErasedDestructor for T
where T: 'static,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.