pub struct PatternImage {
pub width: u32,
pub height: u32,
pub data: Vec<u8>,
}Expand description
An RGBA8 pattern image used for fill-pattern and line-pattern rendering.
The image is stored as a flat Vec<u8> in row-major RGBA order
(width × height × 4 bytes). Typically shared via Arc<PatternImage>
so the same image can be referenced by the style, the engine mesh
data, and the renderer without cloning pixel data.
Fields§
§width: u32Image width in pixels.
height: u32Image height in pixels.
data: Vec<u8>Pixel data in RGBA8 format (width * height * 4 bytes).
Implementations§
Trait Implementations§
Source§impl Clone for PatternImage
impl Clone for PatternImage
Source§fn clone(&self) -> PatternImage
fn clone(&self) -> PatternImage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PatternImage
impl RefUnwindSafe for PatternImage
impl Send for PatternImage
impl Sync for PatternImage
impl Unpin for PatternImage
impl UnsafeUnpin for PatternImage
impl UnwindSafe for PatternImage
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