Skip to main content

SceneOp

Enum SceneOp 

Source
pub enum SceneOp {
Show 29 variants PushTransform { transform: Transform2D, }, PopTransform, PushOpacity { opacity: f32, }, PopOpacity, PushLayer { layer: u32, }, PopLayer, PushClipRect { rect: Rect, }, PushClipRRect { rect: Rect, corner_radii: Corners, }, PushClipPath { bounds: Rect, origin: Point, path: PathId, }, PopClip, PushMask { bounds: Rect, mask: Mask, }, PopMask, PushEffect { bounds: Rect, mode: EffectMode, chain: EffectChain, quality: EffectQuality, }, PopEffect, PushBackdropSourceGroupV1 { bounds: Rect, pyramid: Option<CustomEffectPyramidRequestV1>, quality: EffectQuality, }, PopBackdropSourceGroup, PushCompositeGroup { desc: CompositeGroupDesc, }, PopCompositeGroup, Quad { order: DrawOrder, rect: Rect, background: PaintBindingV1, border: Edges, border_paint: PaintBindingV1, corner_radii: Corners, }, StrokeRRect { order: DrawOrder, rect: Rect, stroke: Edges, stroke_paint: PaintBindingV1, corner_radii: Corners, style: StrokeStyleV1, }, ShadowRRect { order: DrawOrder, rect: Rect, corner_radii: Corners, offset: Point, spread: Px, blur_radius: Px, color: Color, }, Image { order: DrawOrder, rect: Rect, image: ImageId, fit: ViewportFit, sampling: ImageSamplingHint, opacity: f32, }, ImageRegion { order: DrawOrder, rect: Rect, image: ImageId, uv: UvRect, sampling: ImageSamplingHint, opacity: f32, }, MaskImage { order: DrawOrder, rect: Rect, image: ImageId, uv: UvRect, sampling: ImageSamplingHint, color: Color, opacity: f32, }, SvgMaskIcon { order: DrawOrder, rect: Rect, svg: SvgId, fit: SvgFit, color: Color, opacity: f32, }, SvgImage { order: DrawOrder, rect: Rect, svg: SvgId, fit: SvgFit, opacity: f32, }, Text { order: DrawOrder, origin: Point, text: TextBlobId, paint: PaintBindingV1, outline: Option<TextOutlineV1>, shadow: Option<TextShadowV1>, }, Path { order: DrawOrder, origin: Point, path: PathId, paint: PaintBindingV1, }, ViewportSurface { order: DrawOrder, rect: Rect, target: RenderTargetId, opacity: f32, },
}

Variants§

§

PushTransform

Fields

§transform: Transform2D
§

PopTransform

§

PushOpacity

Opacity multiplier applied to subsequent draw ops.

The opacity stack composes multiplicatively (parent * child).

Fields

§opacity: f32
§

PopOpacity

§

PushLayer

Reserved layer stack marker (ADR 0019).

Fields

§layer: u32
§

PopLayer

§

PushClipRect

Fields

§rect: Rect
§

PushClipRRect

Fields

§rect: Rect
§corner_radii: Corners
§

PushClipPath

Push a path-based clip entry (clip-path).

bounds is a computation bound (not an implicit clip) used to bound GPU work and enable deterministic budgeting/degradation. The clip geometry is given by a prepared path handle.

v1 note: renderers may implement this via an offscreen intermediate + mask composite.

Fields

§bounds: Rect
§origin: Point
§path: PathId
§

PopClip

§

PushMask

Fields

§bounds: Rect

Computation bounds (not an implicit clip), see ADR 0239.

§mask: Mask
§

PopMask

§

PushEffect

Fields

§bounds: Rect

Computation bounds (not an implicit clip), see ADR 0117.

§

PopEffect

§

PushBackdropSourceGroupV1

Backdrop source group (v1): a mechanism-level scope that enables renderers to share a raw backdrop snapshot (and optional pyramid) across multiple CustomV3 “liquid glass” surfaces.

bounds are computation bounds (not an implicit clip). pyramid is an optional bounded request for a shared renderer-owned blur pyramid derived from the group snapshot.

See ADR 0302.

Fields

§bounds: Rect

Computation bounds (not an implicit clip).

§pyramid: Option<CustomEffectPyramidRequestV1>

Optional bounded pyramid request shared by the group (upper bound).

§quality: EffectQuality

Quality hint used for deterministic budgeting/degradation.

§

PopBackdropSourceGroup

§

PushCompositeGroup

§

PopCompositeGroup

§

Quad

Fields

§rect: Rect
§background: PaintBindingV1
§border: Edges
§border_paint: PaintBindingV1
§corner_radii: Corners
§

StrokeRRect

Fields

§rect: Rect
§stroke: Edges
§stroke_paint: PaintBindingV1
§corner_radii: Corners
§

ShadowRRect

Draw a single rounded-rect box shadow layer.

This is a first-class geometric shadow primitive for container chrome. Unlike EffectStep::DropShadowV1, it is not content-derived and does not require a FilterContent intermediate.

Fields

§rect: Rect
§corner_radii: Corners
§offset: Point
§spread: Px
§blur_radius: Px
§color: Color
§

Image

Fields

§rect: Rect
§image: ImageId
§opacity: f32
§

ImageRegion

Fields

§rect: Rect
§image: ImageId
§opacity: f32
§

MaskImage

Draw an alpha mask image tinted with a solid color.

The referenced image is expected to store coverage in the red channel (e.g. R8Unorm).

Fields

§rect: Rect
§image: ImageId
§color: Color
§opacity: f32
§

SvgMaskIcon

Draw an SVG as a monochrome icon: rasterize to an alpha mask, then tint with a solid color.

Fields

§rect: Rect
§svg: SvgId
§color: Color
§opacity: f32
§

SvgImage

Draw an SVG as an RGBA image: rasterize and upload as an image texture.

Fields

§rect: Rect
§svg: SvgId
§opacity: f32
§

Text

§

Path

Fields

§origin: Point
§path: PathId
§

ViewportSurface

Fields

§rect: Rect
§opacity: f32

Trait Implementations§

Source§

impl Clone for SceneOp

Source§

fn clone(&self) -> SceneOp

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SceneOp

Source§

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

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

impl Copy for SceneOp

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.