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

## CanvasContext.beginPath

> [VERSION] Base Library >= 2.21.8

### Description

Begin a new path

### Parameters

None


### Return Value

None


### Examples

#### Start a new path

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