Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

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()

void drawShadowRect(Rect* rect, Point offset, Color color, float sigma)
Draws a box shadow cast by the given 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


drawShadowRRect()

void drawShadowRRect(RRect* rRect, Point offset, Color color, float sigma)
Draws a box shadow cast by the given 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


Last modified on October 29, 2026