pub fn update_transform(&mut self, active_transform: &canvas::Transform2D) {
        if &self.state.current_matrix != active_transform && !self.state.is_sprite {
            // Update the current matrix
            self.state.current_matrix   = *active_transform;

            // Work out the scale factor from the matrix (skewed matrices won't produce accurate values here)
            let canvas::Transform2D([[_a, _b, _], [d, e, _], [_, _, _]]) = active_transform;
            // let scale_x              = a*a + b*b;
            let scale_y                 = d*d + e*e;

            self.state.scale_factor     = scale_y.sqrt();

            // Add a 'set transform' to the rendering for this layer
            self.render_order.push(RenderEntity::SetTransform(*active_transform));
        }
    }
///
/// Updates the transformation set for this layer
///
Updates the transformation set for this layer
Updates the transformation set for this layer
pub fn update_transform(&mut self, active_transform: &canvas::Transform2D) {
        if &self.state.current_matrix != active_transform && !self.state.is_sprite {
            // Update the current matrix
            self.state.current_matrix   = *active_transform;
            // Work out the scale factor from the matrix (skewed matrices won't produce accurate values here)
            let canvas::Transform2D([[_a, _b, _], [d, e, _], [_, _, _]]) = active_transform;
            // let scale_x              = a*a + b*b;
            let scale_y                 = d*d + e*e;
            self.state.scale_factor     = scale_y.sqrt();
            // Add a 'set transform' to the rendering for this layer
            self.render_order.push(RenderEntity::SetTransform(*active_transform));
        }
    }
pub fn update_transform ( & mut self , active_transform : & canvas :: Transform2D ) { if & self . state . current_matrix != active_transform && ! self . state . is_sprite { // Update the current matrix self . state . current_matrix = * active_transform ; // Work out the scale factor from the matrix (skewed matrices won't produce accurate values here) let canvas :: Transform2D ( [ [ _a , _b , _ ] , [ d , e , _ ] , [ _ , _ , _ ] ] ) = active_transform ; // let scale_x              = a*a + b*b; let scale_y = d * d + e * e ; self . state . scale_factor = scale_y . sqrt ( ) ; // Add a 'set transform' to the rendering for this layer self . render_order . push ( RenderEntity :: SetTransform ( * active_transform ) ) ; } }
Updates the transformation set for this layer
Updates the transformation set for this layer
&mut self
active_transform
&canvas::Transform2D