pub struct List {
pub trees: Trees,
pub root_transform: Id,
pub root_clip: Id,
pub area: Frame,
/* private fields */
}Expand description
The display list: chunks by paint order, the property trees, and the index over the chunks — the design’s own space, and a space for each child of each run.
Fields§
§trees: Trees§root_transform: IdThe root of the transform tree: the design’s own coordinates.
root_clip: IdThe root of the clip tree: the drawing’s own area.
area: FrameThe drawing’s area.
Implementations§
Source§impl List
impl List
Sourcepub fn new() -> List
pub fn new() -> List
An empty list: the root transform, and the root clip — to an empty
area until List::set_area.
Sourcepub fn of(area: Frame, build: impl FnOnce(&mut Builder<'_>)) -> List
pub fn of(area: Frame, build: impl FnOnce(&mut Builder<'_>)) -> List
A list of one chunk at the origin, area its drawing, built by
build: for painting a few commands by themselves.
Sourcepub fn load(&mut self, chunks: Vec<(Order, Chunk)>)
pub fn load(&mut self, chunks: Vec<(Order, Chunk)>)
Puts the chunks made for a new scene in, those in the design’s own space bulk-loaded into its index with what is in it already.
Sourcepub fn set_area(&mut self, area: Frame)
pub fn set_area(&mut self, area: Frame)
The drawing’s area becomes area, and the root clip with it.
pub fn chunk(&self, order: &Order) -> Option<&Chunk>
Sourcepub fn take(&mut self, order: &Order) -> Option<Chunk>
pub fn take(&mut self, order: &Order) -> Option<Chunk>
Takes the chunk at order out of the list and its space’s index.
Sourcepub fn put(&mut self, order: Order, chunk: Chunk)
pub fn put(&mut self, order: Order, chunk: Chunk)
Puts a chunk in the list and its space’s index.
pub fn run(&self, id: RunId) -> &Run
pub fn run_mut(&mut self, id: RunId) -> &mut Run
Sourcepub fn remove_run(&mut self, id: RunId)
pub fn remove_run(&mut self, id: RunId)
Takes a run out, its entry and cover with it; its children’s chunks must be gone already.
Sourcepub fn place_child(&mut self, id: RunId, key: OrderKey, placed: Option<Placed>)
pub fn place_child(&mut self, id: RunId, key: OrderKey, placed: Option<Placed>)
Puts a run’s child in its sums, as placed — or, with None, takes
it out, its space with it.
Sourcepub fn resum(&mut self, id: RunId)
pub fn resum(&mut self, id: RunId)
The run’s entry and cover in its space made again from its sums — after where it places its children changed.
Sourcepub fn flush(&mut self)
pub fn flush(&mut self)
Sums again every run child whose space changed, and every run around it, out to the design’s own space.
Sourcepub fn unrounded(&self, rect: KRect) -> Vec<(RunId, OrderKey)>
pub fn unrounded(&self, rect: KRect) -> Vec<(RunId, OrderKey)>
The run children that touch rect — in the design’s coordinates —
and no longer round as their spaces were made: what is rounded anew
before rect is painted, hit or read. Only what touches rect is
looked at.
Sourcepub fn query(&self, rect: KRect, pixel: f64) -> Vec<(Vec2, &Chunk, &Command)>
pub fn query(&self, rect: KRect, pixel: f64) -> Vec<(Vec2, &Chunk, &Command)>
The commands that touch rect, in the design’s coordinates, in paint
order — a chunk smaller than pixel both ways skipped — each with its
chunk and where the chunk’s origin is in the design’s coordinates.
Sourcepub fn space_at(&self, space: &Space) -> Vec2
pub fn space_at(&self, space: &Space) -> Vec2
Where a space’s origin is in the design’s coordinates.
Sourcepub fn swap_images(&mut self, last_of: &HashMap<u64, ImageData>)
pub fn swap_images(&mut self, last_of: &HashMap<u64, ImageData>)
Every image the list paints swapped for the blob last_of names for
it, where it names one.