---
name: "CanvasContext.moveTo"
mode: "api"
versionRequirements:
  - { name: "Base Library", version: "2.21.8" }
title: "moveTo"
---

## CanvasContext.moveTo

> [VERSION] Base Library >= 2.21.8

### Description

Move the path to a specified point on the canvas without creating a line

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `x` | `number` | Yes | Target x coordinate |
| `y` | `number` | Yes | Target y coordinate |

### Return Value

None


### Examples

#### Move to the specified point

```ts
const ctx = ty.createCanvasContext('myCanvas');
ctx.beginPath();
ctx.moveTo(10, 10);
ctx.lineTo(100, 10);
ctx.stroke();
ctx.draw();
```
