Struct adi_screen::Transform [−][src]
pub struct Transform(_);
Transform represents a transformation matrix.
Methods
impl Transform
[src]
impl Transform
pub fn new() -> Transform
[src]
pub fn new() -> Transform
Create a transform that does nothing. ( Underneath, this is an identity matrix ).
pub fn translate(self, x: f32, y: f32, z: f32) -> Transform
[src]
pub fn translate(self, x: f32, y: f32, z: f32) -> Transform
Translate self by x, y and z.
pub fn scale(self, x: f32, y: f32, z: f32) -> Transform
[src]
pub fn scale(self, x: f32, y: f32, z: f32) -> Transform
Scale self by x, y and z.
pub fn rotate(self, yaw: f32, pitch: f32, roll: f32) -> Transform
[src]
pub fn rotate(self, yaw: f32, pitch: f32, roll: f32) -> Transform
Rotate self by yaw, pitch and roll.
pub fn auto(self, window: &mut Window, pos: (f32, f32)) -> Transform
[src]
pub fn auto(self, window: &mut Window, pos: (f32, f32)) -> Transform
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]
pub fn apply(self, window: &mut Window, sprite: &mut Sprite) -> Transform
Apply a TransformApply onto instance i of Sprite.