Interface ICanvas4
interface ICanvas4
Extends ICanvas3
ICanvas4 interface extends ICanvas3 with primitives for drawing the shadows of Rect
and RRect occluders, following CSS box-shadow semantics.
Methods
drawShadowRect()
Draws a box shadow cast by the givenvoiddrawShadowRect(Rect*rect,Pointoffset,Colorcolor,floatsigma)
Rect. The shadow is rendered as the rect filled with
the given color, offset by the given amount and Gaussian-blurred by the given sigma.
Parameters
rect
Rect* — Required
The Rect that casts the shadow.
offset
Point — Required
Shadow offset. Point
color
Color — Required
The color of the shadow. Color
sigma
float — Required
Standard deviation of the Gaussian blur applied to the shadow. Larger values produce
a softer, wider edge.
Throws
InvalidArgumentError— if sigma is zero or negative.
drawShadowRRect()
Draws a box shadow cast by the givenvoiddrawShadowRRect(RRect*rRect,Pointoffset,Colorcolor,floatsigma)
RRect. The shadow is rendered as the rounded rect
filled with the given color, offset by the given amount and Gaussian-blurred by the given sigma.
Parameters
rRect
RRect* — Required
The RRect that casts the shadow.
offset
Point — Required
Shadow offset. Point
color
Color — Required
The color of the shadow. Color
sigma
float — Required
Standard deviation of the Gaussian blur applied to the shadow. Larger values produce
a softer, wider edge.
Throws
InvalidArgumentError— if sigma is zero or negative.

