Skip to main content

ScenePrimitive

Enum ScenePrimitive 

Source
pub enum ScenePrimitive {
Show 17 variants Rect { id: UiId, rect: UiRect, style: VisualStyle, phase: RenderPhase, }, Ellipse { id: UiId, rect: UiRect, style: VisualStyle, phase: RenderPhase, }, Text { id: UiId, rect: UiRect, text: Cow<'static, str>, style: TextStyle, phase: RenderPhase, }, Custom { id: UiId, rect: UiRect, key: &'static str, style: Option<CustomPaintStyle>, phase: RenderPhase, }, Line { id: UiId, start: Point, end: Point, stroke: Stroke, phase: RenderPhase, }, Path { id: UiId, rect: UiRect, path: UiPath, style: PathStyle, phase: RenderPhase, }, Image { id: UiId, rect: UiRect, source: UiImageSource, request: ImageRequest, fit: ImageFit, phase: RenderPhase, }, Icon { id: UiId, rect: UiRect, key: &'static str, style: IconStyle, phase: RenderPhase, }, Glow { id: UiId, rect: UiRect, color: Color, alpha: u8, phase: RenderPhase, }, BackdropBlur { id: UiId, rect: UiRect, style: BackdropBlurStyle, phase: RenderPhase, }, BackdropBlurPath { id: UiId, rect: UiRect, path: UiPath, style: BackdropBlurStyle, phase: RenderPhase, }, Overlay { id: UiId, rect: UiRect, style: OverlayStyle, phase: RenderPhase, }, CompositingLayer { id: UiId, rect: UiRect, spec: CompositingLayerSpec, commands: Vec<ScenePrimitive>, content_signature: u64, phase: RenderPhase, }, StaticLayer { id: UiId, rect: UiRect, spec: StaticLayerSpec, commands: Vec<ScenePrimitive>, child_signature: u64, phase: RenderPhase, }, ScrollRaster { id: UiId, viewport: UiRect, spec: ScrollRasterSpec, commands: Vec<ScenePrimitive>, child_signature: u64, phase: RenderPhase, }, Clip { id: UiId, rect: UiRect, commands: Vec<ScenePrimitive>, child_signature: u64, phase: RenderPhase, }, ClipPath { id: UiId, rect: UiRect, path: UiPath, commands: Vec<ScenePrimitive>, child_signature: u64, phase: RenderPhase, },
}

Variants§

§

Rect

Fields

§id: UiId
§rect: UiRect
§

Ellipse

Fields

§id: UiId
§rect: UiRect
§

Text

Fields

§id: UiId
§rect: UiRect
§text: Cow<'static, str>
§

Custom

Fields

§id: UiId
§rect: UiRect
§key: &'static str
§

Line

Fields

§id: UiId
§start: Point
§end: Point
§stroke: Stroke
§

Path

Fields

§id: UiId
§rect: UiRect
§path: UiPath
§

Image

Fields

§id: UiId
§rect: UiRect
§

Icon

Fields

§id: UiId
§rect: UiRect
§key: &'static str
§

Glow

Fields

§id: UiId
§rect: UiRect
§color: Color
§alpha: u8
§

BackdropBlur

§

BackdropBlurPath

Fields

§id: UiId
§rect: UiRect
§path: UiPath
§

Overlay

Fields

§id: UiId
§rect: UiRect
§

CompositingLayer

Fields

§id: UiId
§rect: UiRect
§commands: Vec<ScenePrimitive>

Commands use layer-local coordinates so moving a layer does not invalidate its surface.

§content_signature: u64
§

StaticLayer

Fields

§id: UiId
§rect: UiRect
§child_signature: u64
§

ScrollRaster

Fields

§id: UiId
§viewport: UiRect
§child_signature: u64
§

Clip

Fields

§id: UiId
§rect: UiRect
§child_signature: u64
§

ClipPath

Fields

§id: UiId
§rect: UiRect
§path: UiPath
§child_signature: u64

Implementations§

Source§

impl ScenePrimitive

Source

pub const fn kind(&self) -> ScenePrimitiveKind

Source

pub fn id(&self) -> &UiId

Source

pub fn phase(&self) -> RenderPhase

Source

pub fn rect(&self) -> UiRect

Source

pub fn paint_bounds(&self) -> UiRect

Source

pub fn signature(&self) -> u64

Trait Implementations§

Source§

impl Clone for ScenePrimitive

Source§

fn clone(&self) -> ScenePrimitive

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
Source§

impl Debug for ScenePrimitive

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ScenePrimitive

Source§

fn eq(&self, other: &ScenePrimitive) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ScenePrimitive

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

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.