Struct adi_screen::Transform
[−]
[src]
pub struct Transform(_);
Transform represents a transformation matrix.
Methods
impl Transform
[src]
pub fn new() -> Transform
[src]
Create a transform that does nothing. ( Underneath, this is an identity matrix ).
pub fn translate(self, x: f32, y: f32, z: f32) -> Transform
[src]
Translate self by x, y and z.
pub fn scale(self, x: f32, y: f32, z: f32) -> Transform
[src]
Scale self by x, y and z.
pub fn rotate(self, yaw: f32, pitch: f32, roll: f32) -> Transform
[src]
Rotate self by yaw, pitch and roll.
pub fn auto(self, window: &mut Window, pos: (f32, f32)) -> Transform
[src]
Multiply by a projection that scales width and height by the smallest widget size. The widget is put at position pos. Position isn't affected by aspect ratio.
pub fn apply(self, window: &mut Window, sprite: &mut Sprite) -> Transform
[src]
Apply a TransformApply onto instance i of Sprite.