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
impl PaintScene for DiscardScene
Source§fn fill_rect(&mut self, _origin: Point, _size: Size, _color: AlphaColor<Srgb>)
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)
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>,
)
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>,
)
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>,
)
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)
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)
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,
)
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)
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 draw_glyph_run(&mut self, _run: GlyphRun)
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)
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)
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)
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>,
)
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)
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,
)
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)
fn push_layer(&mut self, _origin: Point, _size: Size, _alpha: f32)
Push a layer composited at
alpha until PaintScene::pop_layer.Source§fn clear_rect(&mut self, _origin: Point, _size: Size)
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)
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,
)
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,
)
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)
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)
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,
)
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)
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,
)
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>
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)
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
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§
impl Freeze for DiscardScene
impl RefUnwindSafe for DiscardScene
impl Send for DiscardScene
impl Sync for DiscardScene
impl Unpin for DiscardScene
impl UnsafeUnpin for DiscardScene
impl UnwindSafe for DiscardScene
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
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>
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)
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)
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
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.