> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
> **NOTE**<br>The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
Use **OffscreenCanvasRenderingContext2D** to draw rectangles, images, and text offscreen onto a canvas. Drawing offscreen onto a canvas is a process where content to draw onto the canvas is first drawn in the buffer, and then converted into a picture, and finally the picture is drawn on the canvas. This process increases the drawing efficiency.
| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | true | Whether to adjust the image smoothness during image drawing. The value **true** means to enable this feature, and **false** means the opposite. |
| imageSmoothingQuality | string | 'low' | Image smoothness. The value can be **'low'**, **'medium'**, or **'high'**. |
Defines a transformation matrix. To transform a graph, you only need to set parameters of the matrix. The coordinates of the graph are multiplied by the matrix values to obtain new coordinates of the transformed graph. You can use the matrix to implement multiple transform effects.
> The following formulas calculate coordinates of the transformed graph. **x** and **y** represent coordinates before transformation, and **x'** and **y'** represent coordinates after transformation.
>
> - x' = scaleX \* x + skewY \* y + translateX
...
...
@@ -1707,7 +1742,8 @@ Defines a transformation matrix. To transform a graph, you only need to set para
- Example
```
```ts
// xxx.ets
@Entry
@Component
structTransform{
...
...
@@ -1760,7 +1796,8 @@ Resets the existing transformation matrix and creates a new transformation matri
- Example
```
```ts
// xxx.ets
@Entry
@Component
structSetTransform{
...
...
@@ -1806,7 +1843,8 @@ Moves the origin of the coordinate system.
- Example
```
```ts
// xxx.ets
@Entry
@Component
structTranslate{
...
...
@@ -1838,18 +1876,18 @@ Moves the origin of the coordinate system.