pub struct Scene {
pub shadows: Vec<Shadow>,
pub quads: Vec<Quad>,
pub paths: Vec<PaintedPath>,
pub underlines: Vec<Underline>,
pub monochrome_sprites: Vec<MonochromeSprite>,
pub subpixel_sprites: Vec<SubpixelSprite>,
pub polychrome_sprites: Vec<PolychromeSprite>,
pub surfaces: Vec<PaintSurface>,
pub native_views: Vec<PaintNativeView>,
pub layers: SceneLayers,
/* private fields */
}Fields§
§shadows: Vec<Shadow>§quads: Vec<Quad>§paths: Vec<PaintedPath>§underlines: Vec<Underline>§monochrome_sprites: Vec<MonochromeSprite>§subpixel_sprites: Vec<SubpixelSprite>§polychrome_sprites: Vec<PolychromeSprite>§surfaces: Vec<PaintSurface>§native_views: Vec<PaintNativeView>§layers: SceneLayersImplementations§
Source§impl Scene
impl Scene
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 primitives.
Transparent input regions are prepared separately from this scene.
Sourcepub fn replay_balanced(
&mut self,
range: Range<usize>,
previous_scene: &Scene,
) -> Result<()>
pub fn replay_balanced( &mut self, range: Range<usize>, previous_scene: &Scene, ) -> Result<()>
Replays a range as a self-contained scene, restoring any layers that were active at the start of the range and closing those still active at its end. The scroll layers whose tiles the range composites come along.
Source§impl Scene
impl Scene
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn push_layer(&mut self, bounds: Bounds<ScaledPixels>)
pub fn pop_layer(&mut self)
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 Forget for Scene
impl Freeze for Scenewhere
*const u8 is !null: Freeze,
PhantomData<PaintOperation>: Freeze,
PhantomData<Cell>: Freeze,
PhantomData<Entry<ScaledPixels>>: Freeze,
PhantomData<(Bounds<ScaledPixels>, u32)>: Freeze,
PhantomData<Bounds<ScaledPixels>>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Layer>: Freeze,
PhantomData<Shadow>: Freeze,
PhantomData<Quad>: Freeze,
PhantomData<PaintedPath>: Freeze,
PhantomData<Underline>: Freeze,
PhantomData<MonochromeSprite>: Freeze,
PhantomData<SubpixelSprite>: Freeze,
PhantomData<PolychromeSprite>: Freeze,
PhantomData<PaintSurface>: Freeze,
PhantomData<PaintNativeView>: Freeze,
PhantomData<SpriteAnimation>: Freeze,
PhantomData<u32>: Freeze,
PhantomData<u64>: Freeze,
PhantomData<u128>: Freeze,
PhantomData<Scope>: Freeze,
*const NativeBatches is !null: Freeze,
PhantomData<NativeBatches>: Freeze,
PhantomData<BoundsTree<ScaledPixels>>: Freeze,
*const Quad is !null: Freeze,
PhantomData<LayerFrame>: Freeze,
impl Move for Scene
impl RefUnwindSafe for Scenewhere
Rc<PathTiles>: RefUnwindSafe,
Range<usize>: RefUnwindSafe,
Quad: RefUnwindSafe,
Rc<[LayerPart]>: RefUnwindSafe,
impl Unpin for Scene
impl UnsafeUnpin for Scenewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<PaintOperation>: UnsafeUnpin,
PhantomData<Cell>: UnsafeUnpin,
PhantomData<Entry<ScaledPixels>>: UnsafeUnpin,
PhantomData<(Bounds<ScaledPixels>, u32)>: UnsafeUnpin,
PhantomData<Bounds<ScaledPixels>>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Layer>: UnsafeUnpin,
PhantomData<Shadow>: UnsafeUnpin,
PhantomData<Quad>: UnsafeUnpin,
PhantomData<PaintedPath>: UnsafeUnpin,
PhantomData<Underline>: UnsafeUnpin,
PhantomData<MonochromeSprite>: UnsafeUnpin,
PhantomData<SubpixelSprite>: UnsafeUnpin,
PhantomData<PolychromeSprite>: UnsafeUnpin,
PhantomData<PaintSurface>: UnsafeUnpin,
PhantomData<PaintNativeView>: UnsafeUnpin,
PhantomData<SpriteAnimation>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<u64>: UnsafeUnpin,
PhantomData<u128>: UnsafeUnpin,
PhantomData<Scope>: UnsafeUnpin,
*const NativeBatches is !null: UnsafeUnpin,
PhantomData<NativeBatches>: UnsafeUnpin,
PhantomData<BoundsTree<ScaledPixels>>: UnsafeUnpin,
*const Quad is !null: UnsafeUnpin,
PhantomData<LayerFrame>: UnsafeUnpin,
impl UnwindSafe for Scenewhere
RawVecInner: UnwindSafe,
Rc<PathTiles>: UnwindSafe,
NonNull<Range<usize>>: UnwindSafe,
Range<usize>: UnwindSafe,
BoxRaw<NativeBatches>: UnwindSafe,
NonNull<Quad>: UnwindSafe,
Quad: UnwindSafe,
Rc<[LayerPart]>: UnwindSafe,
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
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> ⓘ
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().