pub struct Strip {
pub x: u16,
pub y: u16,
/* private fields */
}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.
Implementations§
Source§impl Strip
impl Strip
Sourcepub fn is_sentinel(&self) -> bool
pub fn is_sentinel(&self) -> bool
Return whether the strip is a sentinel strip.
Sourcepub fn width_to(&self, next: &Self) -> u16
pub fn width_to(&self, next: &Self) -> u16
Returns the horizontal pixel width of this strip.
IMPORTANT: This assumes that the next is actually the next adjacent strip
to self, otherwise this method will return a garbage value!
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§
impl Copy for Strip
impl Eq for Strip
impl StructuralPartialEq for Strip
Auto Trait Implementations§
impl Freeze for Strip
impl RefUnwindSafe for Strip
impl Send for Strip
impl Sync for Strip
impl Unpin for Strip
impl UnsafeUnpin 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