
## stroke_rect {#float-float-float-float}

Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.



```python
def stroke_rect(self, x, y, w, h):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| x | float | The x axis of the coordinate for the rectangle starting point. |
| y | float | The y axis of the coordinate for the rectangle starting point. |
| w | float | The rectangle's width. |
| h | float | The rectangle's height. |



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