# CanvasContext.strokeText(string text, number x, number y, number maxWidth)

Draws the text path

## Support

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | **✓** | **✓** | **✓** | V7.35.0+ | Preview
Web app | **X** | **X** | **X** | **X** | /

## Input

Name | Data type | Required | Default value | Description
---|---|---|---|---
text | string | Yes | &nbsp; | Text
x | number | Yes | &nbsp; | Y coordinate
y | number | Yes | &nbsp; | Y coordinate
maxWidth | number | No | &nbsp; | Maximum text width

## Output

None

##  Sample code

```javascript
ctx.setFontSize(20);
ctx.strokeText("Hello Block!", 20, 20);

ctx.draw();
```
