pub struct PaintedTable { /* private fields */ }Expand description
The painted pictures of a frame, by id (ADR-0078). A GlyphBuffer
holds one (GlyphBuffer::pictures_mut).
Implementations§
Source§impl PaintedTable
impl PaintedTable
Sourcepub fn get_mut(&mut self, id: PaintedId) -> Option<&mut Painted>
pub fn get_mut(&mut self, id: PaintedId) -> Option<&mut Painted>
The picture id to change, if the table has it. Taking it moves
nothing; writing its pixels does.
Sourcepub fn get_or_insert_with(
&mut self,
id: PaintedId,
make: impl FnOnce() -> Painted,
) -> &mut Painted
pub fn get_or_insert_with( &mut self, id: PaintedId, make: impl FnOnce() -> Painted, ) -> &mut Painted
The picture id, made by make if the table hasn’t one, whatever
its size: put another in with insert.
Sourcepub fn insert(&mut self, id: PaintedId, picture: Painted) -> &mut Painted
pub fn insert(&mut self, id: PaintedId, picture: Painted) -> &mut Painted
Puts picture in as id, in place of any it had: its revision
moves past the old one’s, so it never names the old pixels.
Sourcepub fn update(&mut self, id: PaintedId, picture: Painted) -> &mut Painted
pub fn update(&mut self, id: PaintedId, picture: Painted) -> &mut Painted
Puts picture in as id unless the table’s already looks the same
(its size, kind, pixels, palette and mask), which it then keeps: so
the revision moves only when the picture changed, and a skin may
make its picture afresh each frame and have it uploaded only when it
differs. One that differs replaces the table’s, as
insert does.
Trait Implementations§
Source§impl Clone for PaintedTable
impl Clone for PaintedTable
Source§fn clone(&self) -> PaintedTable
fn clone(&self) -> PaintedTable
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PaintedTable
impl Debug for PaintedTable
Source§impl Default for PaintedTable
impl Default for PaintedTable
Source§fn default() -> PaintedTable
fn default() -> PaintedTable
Returns the “default value” for a type. Read more
impl Eq for PaintedTable
Source§impl PartialEq for PaintedTable
impl PartialEq for PaintedTable
impl StructuralPartialEq for PaintedTable
Auto Trait Implementations§
impl Freeze for PaintedTable
impl RefUnwindSafe for PaintedTable
impl Send for PaintedTable
impl Sync for PaintedTable
impl Unpin for PaintedTable
impl UnsafeUnpin for PaintedTable
impl UnwindSafe for PaintedTable
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