Function 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 filteredfilter
- the image filter to be appliedsubset
- bounds ofImage
processed by filterclip_bounds
- expected bounds of filteredImage
Returns filtered SkImage, or None
: