Skip to main content

List

Struct List 

Source
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: Id

The root of the transform tree: the design’s own coordinates.

§root_clip: Id

The root of the clip tree: the drawing’s own area.

§area: Frame

The drawing’s area.

Implementations§

Source§

impl List

Source

pub fn action_at(&self, x: f64, y: f64) -> Option<&str>

The interaction of the topmost node at (x, y), in the design’s coordinates, that has one and whose clipping frames show it there.

Source§

impl List

Source

pub fn new() -> List

An empty list: the root transform, and the root clip — to an empty area until List::set_area.

Source

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.

Source

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.

Source

pub fn set_area(&mut self, area: Frame)

The drawing’s area becomes area, and the root clip with it.

Source

pub fn covered(&self) -> Option<KRect>

What the chunks cover together, before rounding.

Source

pub fn chunk(&self, order: &Order) -> Option<&Chunk>

Source

pub fn chunks(&self) -> impl Iterator<Item = (&Order, &Chunk)>

Every chunk, in paint order.

Source

pub fn take(&mut self, order: &Order) -> Option<Chunk>

Takes the chunk at order out of the list and its space’s index.

Source

pub fn put(&mut self, order: Order, chunk: Chunk)

Puts a chunk in the list and its space’s index.

Source

pub fn add_run(&mut self, space: Space) -> RunId

A new run, in space, with no children yet.

Source

pub fn run(&self, id: RunId) -> &Run

Source

pub fn run_mut(&mut self, id: RunId) -> &mut Run

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn free(&mut self, made: &Made)

Frees the property-tree nodes a chunk’s own layers made.

Source

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.

Source

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.

Source

pub fn space_at(&self, space: &Space) -> Vec2

Where a space’s origin is in the design’s coordinates.

Source

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.

Trait Implementations§

Source§

impl Default for List

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for List

§

impl !UnwindSafe for List

§

impl Freeze for List

§

impl Send for List

§

impl Sync for List

§

impl Unpin for List

§

impl UnsafeUnpin for List

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.