Function vizia::vg::image::images::make_with_filter

pub fn make_with_filter(
    image: impl Into<RCHandle<SkImage>>,
    image_filter: &RCHandle<SkImageFilter>,
    subset: impl AsRef<IRect>,
    clip_bounds: impl AsRef<IRect>,
) -> Option<(RCHandle<SkImage>, IRect, IPoint)>
Expand description

Creates a filtered Image on the CPU. filter processes the src image, potentially changing the color, position, and size. subset is the bounds of src that are processed by filter. clip_bounds is the expected bounds of the filtered Image. out_subset is required storage for the actual bounds of the filtered Image. offset is required storage for translation of returned Image.

Returns None a filtered result could not be created.

Useful for animation of ImageFilter that varies size from frame to frame. out_subset describes the valid bounds of returned image. offset translates the returned Image to keep subsequent animation frames aligned with respect to each other.

  • src - the image to be filtered
  • filter - the image filter to be applied
  • subset - bounds of Image processed by filter
  • clip_bounds - expected bounds of filtered Image Returns filtered SkImage, or None:
  • out_subset - storage for returned Image bounds
  • offset - storage for returned Image translation Returns: filtered Image, or None