
## scale {#float-float}

Adds a scaling transformation to the canvas units by x horizontally and by y vertically.



```python
def scale(self, x, y):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| x | float | Scaling factor in the horizontal direction. |
| y | float | Scaling factor in the vertical direction. |



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