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: Color)

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: Color, )

Fill a rectangle with uniformly rounded corners.
Source§

fn fill_rounded_rect_radii( &mut self, origin: Point, size: Size, radii: CornerRadii, color: Color, )

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: Color)

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: Color, )

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<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> 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.