pub struct Tiles {
tile_buf: Vec<Tile>,
level: Level,
sorted: bool,
}
Expand description
Handles the tiling of paths.
Fields§
§tile_buf: Vec<Tile>
§level: Level
§sorted: bool
Implementations§
Source§impl Tiles
impl Tiles
Sourcepub fn sort_tiles(&mut self)
pub fn sort_tiles(&mut self)
Sort the tiles in the container.
Sourcepub fn get(&self, index: u32) -> &Tile
pub fn get(&self, index: u32) -> &Tile
Get the tile at a certain index.
Panics if the container hasn’t been sorted before.
Sourcepub fn iter(&self) -> impl Iterator<Item = &Tile>
pub fn iter(&self) -> impl Iterator<Item = &Tile>
Iterate over the tiles in sorted order.
Panics if the container hasn’t been sorted before.
Sourcepub fn make_tiles(&mut self, lines: &[Line], width: u16, height: u16)
pub fn make_tiles(&mut self, lines: &[Line], width: u16, height: u16)
Populate the tiles’ container with a buffer of lines.
Tiles exceeding the top, right or bottom of the viewport (given by width
and height
in
pixels) are culled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tiles
impl RefUnwindSafe for Tiles
impl Send for Tiles
impl Sync for Tiles
impl Unpin for Tiles
impl UnwindSafe for Tiles
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