pub struct Res(/* private fields */);Expand description
Pixel resolution of a given texture. The resolution is stored in log form: ulog2 = log2(ures), vlog2 = log2(vres)). Note: negative ulog2 or vlog2 values are reserved for internal use.
Implementations§
Source§impl Res
impl Res
pub fn from_uv(u: i8, v: i8) -> Self
pub fn from_value(value: u16) -> Self
Sourcepub fn clone_swapped(&self) -> Self
pub fn clone_swapped(&self) -> Self
Get value of resolution with u and v swapped.
Sourcepub fn ntilesu(&self, tileres: Res) -> i32
pub fn ntilesu(&self, tileres: Res) -> i32
Determine the number of tiles in the u direction for the given tile res.
Trait Implementations§
impl Copy for Res
impl Eq for Res
impl StructuralPartialEq for Res
Auto Trait Implementations§
impl Freeze for Res
impl RefUnwindSafe for Res
impl Send for Res
impl Sync for Res
impl Unpin for Res
impl UnwindSafe for Res
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