Struct adi_screen::Transform [−][src]
pub struct Transform(_);
Transform represents a transformation matrix.
Methods
impl Transform[src]
impl Transformpub fn new() -> Transform[src]
pub fn new() -> TransformCreate 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) -> TransformTranslate 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) -> TransformScale 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) -> TransformRotate 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)) -> TransformMultiply 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) -> TransformApply a TransformApply onto instance i of Sprite.