[][src]Function ggez::graphics::push_transform

pub fn push_transform<M>(context: &mut Context, transform: Option<M>) where
    M: Into<ColumnMatrix4<f32>>, 

Pushes a homogeneous transform matrix to the top of the transform (model) matrix stack of the Context. If no matrix is given, then pushes a copy of the current transform matrix to the top of the stack.

You must call apply_transformations(ctx) after calling this to apply these changes and recalculate the underlying MVP matrix.

A DrawParam can be converted into an appropriate transform matrix by turning it into a DrawTransform:

let param = /* DrawParam building */
let transform = param.to_matrix();
graphics::push_transform(ctx, Some(transform));