fillShading

open fun fillShading(shading: KiteShading, ctm: Matrix, clipPath: KitePath?, alpha: Double = 1.0, blendMode: BlendMode = BlendMode.Normal)

Fill clipPath (under ctm) with the gradient defined by shading. If clipPath is null the shading covers the current clip region (or the page, when no clip is active). That is the spec's sh operator.

Default impl falls back to a flat-colour fill using the midpoint sample; backends that can render real gradients override. For the whole-clip case it fills a rectangle far larger than any page under the identity matrix. The backend's active clip (or page bounds) trims it, so sh still paints something rather than nothing.