<canvas>
Introduction
This sample shows how to use the <canvas> component to customize drawings.
Usage
-
Touch the arc button to draw a circle on the canvas.
-
Touch the strokeText button to draw text with stroke effects on the canvas.
-
Touch the close button to draw a closed path on the canvas.
-
Touch the bezierCurve button to draw a curve on the canvas.
-
Touch the textBaseline button to draw a text baseline in the horizontal direction for text alignment on the canvas.
-
Touch the image button to draw an image on the canvas.
-
Touch the radialGradient button to draw a radial gradient color on the canvas.
-
Touch the linearGradient button to draw a linear gradient color on the canvas.
-
Touch the filter button to show drawings with different filter effects on the canvas.
-
Touch the clear button to clear the canvas.
Constraints
This sample can only be run on standard-system devices.