vizia::vg::image_filters

Function crop

pub fn crop(
    rect: impl AsRef<Rect>,
    tile_mode: impl Into<Option<SkTileMode>>,
    input: impl Into<Option<RCHandle<SkImageFilter>>>,
) -> Option<RCHandle<SkImageFilter>>
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