pub struct Scene {
pub shadows: Vec<Shadow>,
pub quads: Vec<Quad>,
pub paths: Vec<Path<ScaledPixels>>,
pub underlines: Vec<Underline>,
pub monochrome_sprites: Vec<MonochromeSprite>,
pub subpixel_sprites: Vec<SubpixelSprite>,
pub polychrome_sprites: Vec<PolychromeSprite>,
pub surfaces: Vec<PaintSurface>,
pub backdrop_blurs: Vec<BackdropBlur>,
/* private fields */
}Fields§
§shadows: Vec<Shadow>§quads: Vec<Quad>§paths: Vec<Path<ScaledPixels>>§underlines: Vec<Underline>§monochrome_sprites: Vec<MonochromeSprite>§subpixel_sprites: Vec<SubpixelSprite>§polychrome_sprites: Vec<PolychromeSprite>§surfaces: Vec<PaintSurface>§backdrop_blurs: Vec<BackdropBlur>Backdrop-blur regions — deliberately outside the primitive batch stream so renderers can snapshot the framebuffer at each blur’s order.
Implementations§
Source§impl Scene
impl Scene
pub fn clear(&mut self)
pub fn len(&self) -> usize
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns whether the scene contains no drawable primitives.
A scene may have paint operations that only open and close empty layers,
so len() == 0 is not equivalent to having no visible/input-relevant
overlay content.
pub fn push_layer(&mut self, bounds: Bounds<ScaledPixels>)
pub fn pop_layer(&mut self)
pub fn insert_backdrop_blur(&mut self, blur: BackdropBlur)
pub fn insert_primitive(&mut self, primitive: impl Into<Primitive>)
pub fn replay(&mut self, range: Range<usize>, prev_scene: &Scene)
pub fn finish(&mut self)
pub fn batches(&self) -> impl Iterator<Item = PrimitiveBatch> + '_
Trait Implementations§
Auto Trait Implementations§
impl !Send for Scene
impl !Sync for Scene
impl Freeze for Scene
impl RefUnwindSafe for Scene
impl Unpin for Scene
impl UnsafeUnpin for Scene
impl UnwindSafe for Scene
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> 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> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().