
## translate {#float-float}

Adds a translation transformation by moving the canvas and its origin x horzontally and y vertically on the grid.



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


| Parameter | Type | Description |
| :- | :- | :- |
| x | float | Distance to move in the horizontal direction. |
| y | float | Distance to move in the vertical direction. |



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