pub struct Strip {
pub x: u16,
pub y: u16,
packed_alpha_idx_fill_gap: u32,
}Expand description
A strip.
Fields§
§x: u16The x coordinate of the strip, in user coordinates.
y: u16The y coordinate of the strip, in user coordinates.
packed_alpha_idx_fill_gap: u32Packed alpha index and fill gap flag.
Bit layout (u32):
- bit 31:
fill_gap(SeeStrip::fill_gap()). - bits 0..=30:
alpha_idx(SeeStrip::alpha_idx()).
Implementations§
Source§impl Strip
impl Strip
Sourceconst FILL_GAP_MASK: u32 = 2_147_483_648u32
const FILL_GAP_MASK: u32 = 2_147_483_648u32
The bit mask for fill_gap packed into packed_alpha_idx_fill_gap.
Sourcepub fn set_alpha_idx(&mut self, alpha_idx: u32)
pub fn set_alpha_idx(&mut self, alpha_idx: u32)
Sets the alpha index.
Note that the largest value that can be stored in the alpha index is u32::MAX << 1, as the
highest bit is reserved for fill_gap.
Sourcepub fn fill_gap(&self) -> bool
pub fn fill_gap(&self) -> bool
Returns whether the gap that lies between this strip and the previous in the same row should be filled.
Sourcepub fn set_fill_gap(&mut self, fill: bool)
pub fn set_fill_gap(&mut self, fill: bool)
Sets whether the gap that lies between this strip and the previous in the same row should be filled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Strip
impl RefUnwindSafe for Strip
impl Send for Strip
impl Sync for Strip
impl Unpin for Strip
impl UnwindSafe for Strip
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