Skip to main content

encode_image_brush

Function encode_image_brush 

Source
pub fn encode_image_brush(
    brush: &ImageBrush,
    transform: Affine,
    encoded_paints: &mut Vec<EncodedPaint>,
    images: &mut ImageResidency,
) -> Result<ImageEncoding, ImageSkip>
Expand description

Encode an image brush drawn at its natural pixel size under transform.

The vello contract an image brush carries: the pixels land one-for-one on the device grid under the paint transform, with the sampler’s extend modes covering everything the shape reaches beyond them.

§Errors

Returns the ImageSkip the residency refused the image with, or ImageSkip::SingularTransform for a paint transform with no inverse.