pub fn transform(&self, transform_matrix: &canvas::Transform2D) -> Self {
        let transform_matrix = transform_to_matrix(&transform_matrix);

        match self {
            FillState::None                                                 => self.clone(),
            FillState::Color(_)                                             => self.clone(),
            FillState::Texture(texture_id, matrix, repeat, alpha)           => FillState::Texture(*texture_id, (*matrix).multiply(transform_matrix), *repeat, *alpha),
            FillState::LinearGradient(texture_id, matrix, repeat, alpha)    => FillState::LinearGradient(*texture_id, (*matrix).multiply(transform_matrix), *repeat, *alpha)
        }
    }
///
/// Updates the fill state with a transformed matrix
///
Updates the fill state with a transformed matrix
Updates the fill state with a transformed matrix
pub fn transform(&self, transform_matrix: &canvas::Transform2D) -> Self {
        let transform_matrix = transform_to_matrix(&transform_matrix);
        match self {
            FillState::None                                                 => self.clone(),
            FillState::Color(_)                                             => self.clone(),
            FillState::Texture(texture_id, matrix, repeat, alpha)           => FillState::Texture(*texture_id, (*matrix).multiply(transform_matrix), *repeat, *alpha),
            FillState::LinearGradient(texture_id, matrix, repeat, alpha)    => FillState::LinearGradient(*texture_id, (*matrix).multiply(transform_matrix), *repeat, *alpha)
        }
    }
pub fn transform ( & self , transform_matrix : & canvas :: Transform2D ) -> Self { let transform_matrix = transform_to_matrix ( & transform_matrix ) ; match self { FillState :: None => self . clone ( ) , FillState :: Color ( _ ) => self . clone ( ) , FillState :: Texture ( texture_id , matrix , repeat , alpha ) => FillState :: Texture ( * texture_id , ( * matrix ) . multiply ( transform_matrix ) , * repeat , * alpha ) , FillState :: LinearGradient ( texture_id , matrix , repeat , alpha ) => FillState :: LinearGradient ( * texture_id , ( * matrix ) . multiply ( transform_matrix ) , * repeat , * alpha ) } }
Updates the fill state with a transformed matrix
Updates the fill state with a transformed matrix
&self
transform_matrix
&canvas::Transform2D