pub fn transform_to_matrix(transform: &canvas::Transform2D) -> render::Matrix {
    let canvas::Transform2D(t) = transform;

    render::Matrix([
        [t[0][0], t[0][1], 0.0, t[0][2]],
        [t[1][0], t[1][1], 0.0, t[1][2]],
        [t[2][0], t[2][1], 1.0, t[2][2]],
        [0.0,     0.0,     0.0, 1.0]
    ])
}
///
/// Converts a canvas transform to a rendering matrix
///
Converts a canvas transform to a rendering matrix
Converts a canvas transform to a rendering matrix
pub fn transform_to_matrix(transform: &canvas::Transform2D) -> render::Matrix {
    let canvas::Transform2D(t) = transform;
    render::Matrix([
        [t[0][0], t[0][1], 0.0, t[0][2]],
        [t[1][0], t[1][1], 0.0, t[1][2]],
        [t[2][0], t[2][1], 1.0, t[2][2]],
        [0.0,     0.0,     0.0, 1.0]
    ])
}
pub fn transform_to_matrix ( transform : & canvas :: Transform2D ) -> render :: Matrix { let canvas :: Transform2D ( t ) = transform ; render :: Matrix ( [ [ t [ 0 ] [ 0 ] , t [ 0 ] [ 1 ] , 0.0 , t [ 0 ] [ 2 ] ] , [ t [ 1 ] [ 0 ] , t [ 1 ] [ 1 ] , 0.0 , t [ 1 ] [ 2 ] ] , [ t [ 2 ] [ 0 ] , t [ 2 ] [ 1 ] , 1.0 , t [ 2 ] [ 2 ] ] , [ 0.0 , 0.0 , 0.0 , 1.0 ] ] ) }
Converts a canvas transform to a rendering matrix
Converts a canvas transform to a rendering matrix
transform
&canvas::Transform2D