Skip to main content

DiscardScene

Struct DiscardScene 

Source
pub struct DiscardScene;
Expand description

A PaintScene that records nothing, for painting a subtree (an alpha-0 page) only for its side effects — hero rects, animating children.

Trait Implementations§

Source§

impl PaintScene for DiscardScene

Source§

fn fill_rect(&mut self, _origin: Point, _size: Size, _color: AlphaColor<Srgb>)

Fill an axis-aligned rectangle at origin/size with solid color.
Source§

fn draw_text(&mut self, _origin: Point, _text: &str)

Emit unshaped text (recorder intent only); SceneBuilder ignores it.
Source§

fn fill_rounded_rect( &mut self, _origin: Point, _size: Size, _radius: f64, _color: AlphaColor<Srgb>, )

Fill a rectangle with uniformly rounded corners.
Source§

fn fill_rounded_rect_radii( &mut self, origin: Point, size: Size, radii: CornerRadii, color: AlphaColor<Srgb>, )

Fill a rectangle with per-corner radii (defaults to the largest corner).
Source§

fn stroke_line( &mut self, _p0: Point, _p1: Point, _width: f64, _color: AlphaColor<Srgb>, )

Stroke a straight line from p0 to p1 with width and solid color.
Source§

fn push_clip(&mut self, _origin: Point, _size: Size)

Push a rectangular clip until the matching PaintScene::pop_clip.
Source§

fn push_clip_rounded(&mut self, _origin: Point, _size: Size, _radius: f64)

Push a clip with uniformly rounded corners; one clip stack for all kinds.
Source§

fn push_clip_rounded_radii( &mut self, origin: Point, size: Size, radii: CornerRadii, )

Push a clip with per-corner radii. Defaults to the largest corner, not a no-op, so a recorder’s clip stack stays balanced.
Source§

fn push_clip_path(&mut self, origin: Point, path: &BezPath)

Push a clip to path’s interior (nonzero, local space plus origin); a retained body under it paints inline. Defaults to the bounding-box clip.
Source§

fn pop_clip(&mut self)

Pop the most recently pushed clip, rectangular, rounded or path.
Source§

fn draw_glyph_run(&mut self, _run: GlyphRun)

Emit a run of already-shaped glyphs.
Source§

fn draw_image(&mut self, _data: &ImageData, _dest: Rect)

Draw a decoded image scaled from its natural size to fill dest.
Source§

fn draw_shader(&mut self, _program: &ShaderProgram, _dest: Rect, _time: f32)

Draw a fragment-shader-filled rect into dest; time is app seconds (no CPU golden: docs/LIMITATIONS.md engine-shader-quad-goldens-uncomparable). program must be a retained handle — minting one per paint or build misses the pipeline cache every frame.
Source§

fn draw_scene_texture(&mut self, _id: u64, _dest: Rect)

Composite the scene texture id (bound by frust_gpu::ExternalPass::record) into dest, blended; an unbound id draws nothing and warns once.
Source§

fn draw_shadow( &mut self, _origin: Point, _size: Size, _radius: f64, _std_dev: f64, _color: AlphaColor<Srgb>, )

Draw a Gaussian-blurred rounded-rect elevation shadow at origin/size.
Source§

fn fill_rect_brush(&mut self, origin: Point, size: Size, brush: &Brush)

Fill a rectangle with brush; defaults to fill_rect with its solid color (transparent for a gradient).
Source§

fn fill_rounded_rect_brush( &mut self, _origin: Point, _size: Size, _radius: f64, _brush: &Brush, )

Fill a rounded rectangle with an arbitrary brush.
Source§

fn push_layer(&mut self, _origin: Point, _size: Size, _alpha: f32)

Push a layer composited at alpha until PaintScene::pop_layer.
Source§

fn pop_layer(&mut self)

Pop the most recently pushed layer.
Source§

fn clear_rect(&mut self, _origin: Point, _size: Size)

Clear a rect to alpha 0, erasing what lies below — the platform-view hole-punch on a translucent surface; opaque surfaces disregard it.
Source§

fn fill_path(&mut self, _origin: Point, _path: &BezPath, _brush: &Brush)

Fill a vector path (local space plus origin) with brush, nonzero.
Source§

fn stroke_path( &mut self, _origin: Point, _path: &BezPath, _width: f64, _brush: &Brush, )

Stroke a vector path with width, round caps/joins and brush.
Source§

fn stroke_path_dashed( &mut self, origin: Point, path: &BezPath, width: f64, _dash: DashPattern, brush: &Brush, )

Stroke path dashed by dash; defaults to a solid stroke.
Source§

fn push_transform(&mut self, _transform: Affine)

Push an affine transform (the one seam carrying scale/rotation) until PaintScene::pop_transform.
Source§

fn pop_transform(&mut self)

Pop the most recently pushed transform.
Source§

fn push_retained( &mut self, _key: u64, origin: Point, size: Size, alpha: f32, scale: f64, )

Push a retained bracket cached by key, presented at alpha and uniform scale; the default emulates it with a transform then a layer.
Source§

fn pop_retained(&mut self)

Pop a retained bracket: by default the layer, then the transform.
Source§

fn draw_retained( &mut self, _key: u64, _origin: Point, _size: Size, _alpha: f32, _scale: f64, )

Draw the body cached under key, sent only for keys the ledger listed.
Source§

fn current_transform(&self) -> Option<Affine>

The transform the next command records under (device scale included), or None (identity); a retained boundary requests pages at this scale.
Source§

fn backdrop_blur(&mut self, _origin: Point, _size: Size, _radius: f64)

Blur what is already painted under origin/size with a Gaussian of standard deviation radius (frosted glass).
Source§

fn command_index(&self) -> usize

The painter-order index of the next command (0 for a recorder), which a platform-view slot stamps on PlatformViewFrame::command_index.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> StorageAccess<T> for T

Source§

fn as_borrowed(&self) -> &T

Borrows the value.
Source§

fn into_taken(self) -> T

Takes the value.
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.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more