---
title: "IViewportHandler | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/IViewportHandler/"
---

# IViewportHandler

> `void`

## Interfaces

### IViewportHandler

#### Methods

##### applyViewportTransformTo2dContext()

```ts
applyViewportTransformTo2dContext(context, canvas): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | `CanvasRenderingContext2D` |
| `canvas` | `HTMLCanvasElement` |

###### Returns

##### applyViewportTransformToTwMatrix()

```ts
applyViewportTransformToTwMatrix(matrix, canvas): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `matrix` | `Matrix` |
| `canvas` | `HTMLCanvasElement` |

###### Returns

`void`
