pub struct Zone8 {
pub p: Position8,
pub s: Size8,
}Fields§
§p: Position8§s: Size8Implementations§
source§impl Zone8
impl Zone8
sourcepub const fn new(position: Position8, size: Size8) -> Self
pub const fn new(position: Position8, size: Size8) -> Self
Returns a new zone from the provided position and size.
sourcepub const fn new_raw(x: i8, y: i8, width: i8, height: i8) -> Self
pub const fn new_raw(x: i8, y: i8, width: i8, height: i8) -> Self
Returns a new zone from the provided position and size raw components.
sourcepub const fn position_size(&self) -> (Position8, Size8)
pub const fn position_size(&self) -> (Position8, Size8)
Gets a tuple with the position and size.
sourcepub fn set_position(self, position: impl Into<Position8>)
pub fn set_position(self, position: impl Into<Position8>)
Chain-set the position.
source§impl Zone8
impl Zone8
sourcepub const fn as_tuple(&self) -> (i8, i8, i8, i8)
pub const fn as_tuple(&self) -> (i8, i8, i8, i8)
Returns a tuple with the (x, y, width, height) components.
sourcepub const fn from_tuple(tup: (i8, i8, i8, i8)) -> Zone8
pub const fn from_tuple(tup: (i8, i8, i8, i8)) -> Zone8
Creates a zone from a tuple with (x, y, width, height) components.