skia_safe::image_filters

Function crop

Source
pub fn crop(
    rect: impl AsRef<Rect>,
    tile_mode: impl Into<Option<TileMode>>,
    input: impl Into<Option<ImageFilter>>,
) -> Option<ImageFilter>
Expand description

Create a filter that applies a crop to the result of the ‘input’ filter. Pixels within the crop rectangle are unmodified from what ‘input’ produced. Pixels outside of crop match the provided TileMode (defaulting to Decal).

  • rect - The cropping geometry
  • tile_mode - The tile mode applied to pixels outside of ‘crop’
  • input - The input filter that is cropped, uses source image if this is None