Function local_bounds
pub fn local_bounds(
ctm: &Matrix,
path: &Handle<SkPath>,
z_plane_params: impl Into<Point3>,
light_pos: impl Into<Point3>,
light_radius: f32,
flags: u32,
) -> Option<Rect>Expand description
Generate bounding box for shadows relative to path. Includes both the ambient and spot shadow bounds.
ctmCurrent transformation matrix to device space.pathThe occluder used to generate the shadows.z_plane_paramsValues for the plane function which returns the Z offset of the occluder from the canvas based on local x and y values (the current matrix is not applied).light_posGenerally, the 3D position of the light relative to the canvas plane. Ifself::ShadowFlags::DIRECTIONAL_LIGHTis set, this specifies a vector pointing towards the light.light_radiusGenerally, the radius of the disc light. Ifself::ShadowFlags::DIRECTIONAL_LIGHTis set, this specifies the amount of blur when the occluder is at Z offset == 1. The blur will grow linearly as the Z value increases.flagsOptions controlling opaque occluder optimizations, shadow appearance, and light position. Seeself::ShadowFlags.
Returns the shadow bounding box if successful, None otherwise.