Skip to main content

EncodeExt

Trait EncodeExt 

Source
pub trait EncodeExt: Sealed {
    // Required method
    fn encode_into(
        &self,
        paints: &mut Vec<EncodedPaint>,
        transform: Affine,
        tint: Option<Tint>,
    ) -> Paint;
}
Expand description

A trait for encoding paints.

Required Methods§

Source

fn encode_into( &self, paints: &mut Vec<EncodedPaint>, transform: Affine, tint: Option<Tint>, ) -> Paint

Encode the paint and push it into a vector of encoded paints, returning the corresponding paint in the process. This will also validate the paint.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl EncodeExt for Gradient

Source§

fn encode_into( &self, paints: &mut Vec<EncodedPaint>, transform: Affine, _tint: Option<Tint>, ) -> Paint

Encode the gradient into a paint.

Implementors§