pub struct UvTransform {
pub scale: [f32; 2],
pub offset: [f32; 2],
}Expand description
An affine transform applied to texture coordinates before sampling.
The reference resolves a tile to the closest loaded ancestor image plus the
exact sub-rectangle of that image the tile occupies. That rectangle is
uv * scale + offset, where scale is the sub-rect extent and offset is
its origin.
Fields§
§scale: [f32; 2]§offset: [f32; 2]Implementations§
Source§impl UvTransform
impl UvTransform
Trait Implementations§
Source§impl Clone for UvTransform
impl Clone for UvTransform
impl Copy for UvTransform
Source§impl Debug for UvTransform
impl Debug for UvTransform
Source§impl Default for UvTransform
impl Default for UvTransform
Source§impl PartialEq for UvTransform
impl PartialEq for UvTransform
impl StructuralPartialEq for UvTransform
Auto Trait Implementations§
impl Forget for UvTransform
impl Freeze for UvTransform
impl Move for UvTransform
impl RefUnwindSafe for UvTransform
impl Send for UvTransform
impl Sync for UvTransform
impl Unpin for UvTransform
impl UnsafeUnpin for UvTransform
impl UnwindSafe for UvTransform
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