---
title: "ICanvasRenderingContext2D.Scale"
url: "https://reference.aspose.com/html/net/aspose.html.dom.canvas/icanvasrenderingcontext2d/scale/"
product: "Aspose.HTML for .NET API Reference"
description: "ICanvasRenderingContext2D Scale method. Adds a scaling transformation to the canvas units by x horizontally and by y vertically"
---

## ICanvasRenderingContext2D.Scale method

Adds a scaling transformation to the canvas units by x horizontally and by y vertically.

```csharp
public void Scale(double x, double y)
```

| Parameter | Type | Description |
| --- | --- | --- |
| x | Double | Scaling factor in the horizontal direction. |
| y | Double | Scaling factor in the vertical direction. |

### See Also

* interface [ICanvasRenderingContext2D](../)
* namespace [Aspose.Html.Dom.Canvas](../../../aspose.html.dom.canvas/)
* assembly [Aspose.HTML](../../../)
