pub struct TiledPattern { /* private fields */ }Expand description
A pre-rasterised tiling pattern.
The tile is a row-major RGB8 pixel buffer of width × height pixels,
anchored at (phase_x, phase_y) in device space. fill_span tiles the
buffer by wrapping coordinates with rem_euclid.
§Invariants
width > 0andheight > 0(asserted inTiledPattern::new)pixels.len() == width * height * 3
Implementations§
Trait Implementations§
Source§impl Pattern for TiledPattern
impl Pattern for TiledPattern
Source§fn is_static_color(&self) -> bool
fn is_static_color(&self) -> bool
Return
true if this pattern yields the same colour at every coordinate.
When true, fill_span will be called once and the result reused across
the whole span (optimisation hint only — correctness is not affected).Auto Trait Implementations§
impl Freeze for TiledPattern
impl RefUnwindSafe for TiledPattern
impl Send for TiledPattern
impl Sync for TiledPattern
impl Unpin for TiledPattern
impl UnsafeUnpin for TiledPattern
impl UnwindSafe for TiledPattern
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