
## stroke_text {#str-float-float}

Draws (strokes) a given text at the given (x, y) position.



```python
def stroke_text(self, text, x, y):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| text | str | The text to draw using the current font, textAlign, textBaseline, and direction values. |
| x | float | The x axis of the coordinate for the text starting point. |
| y | float | The y axis of the coordinate for the text starting point. |


## stroke_text {#str-float-float-Nullable<double>}





```python
def stroke_text(self, text, x, y, max_width):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| text | str |  |
| x | float |  |
| y | float |  |
| max_width | Nullable<double> |  |



### See Also
* module [`aspose.html.dom.canvas`](../../)
* class [`ICanvasRenderingContext2D`](/html/python-net/aspose.html.dom.canvas/icanvasrenderingcontext2d)
