README.md
1# **<canvas\>**
2
3### Introduction
4
5This sample shows how to use the **<canvas\>** component to customize drawings.
6
7### Usage
8
91. Touch the **arc** button to draw a circle on the canvas.
10
112. Touch the **strokeText** button to draw text with stroke effects on the canvas.
12
133. Touch the **close** button to draw a closed path on the canvas.
14
154. Touch the **bezierCurve** button to draw a curve on the canvas.
16
175. Touch the **textBaseline** button to draw a text baseline in the horizontal direction for text alignment on the canvas.
18
196. Touch the **image** button to draw an image on the canvas.
20
217. Touch the **radialGradient** button to draw a radial gradient color on the canvas.
22
238. Touch the **linearGradient** button to draw a linear gradient color on the canvas.
24
259. Touch the **filter** button to show drawings with different filter effects on the canvas.
26
2710. Touch the **clear** button to clear the canvas.
28
29### Constraints
30
31This sample can only be run on standard-system devices.
32
README_zh.md
1# 画布组件
2
3### 简介
4
5<canvas\>组件可以自定义绘制图形,本示例展示了<canvas\>组件的使用方法。实现效果如下:
6
7
8
9### 相关概念
10
11Canvas:提供画布组件,用于自定义绘制图形。
12
13### 相关权限
14
15不涉及。
16
17### 使用说明
18
191.点击**弧线**按钮,在画布上绘制出一个圆。
20
212.点击**描边**按钮,在画布上绘制出带描边效果的文本。
22
233.点击**封闭**按钮,在画布上绘制出封闭路径。
24
254.点击**贝塞尔曲线**按钮,在画布上绘制出一条曲线。
26
275.点击**水平对齐**按钮,在画布上绘制文本水平对齐的方式。
28
296.点击**图片**按钮,在画布上绘制一张图片。
30
317.点击**径向渐变**按钮,在画布上绘制径向渐变的颜色。
32
338.点击**线性渐变**按钮,在画布上绘制线性渐变的颜色。
34
359.点击**滤镜**按钮,在画布上绘制多种不同滤镜处理下的效果。
36
3710.点击**清除**按钮,清除画布上所有绘制的内容。
38
39### 约束与限制
40
411.本示例仅支持标准系统运行。
42
432.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。