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

## CanvasContext.arcTo

> [VERSION] Base Library >= 2.21.8

### Description

Draw an arc path based on control points and radius

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `x1` | `number` | Yes | x-coordinate of the first control point |
| `y1` | `number` | Yes | y-coordinate of the first control point |
| `x2` | `number` | Yes | x-coordinate of the second control point |
| `y2` | `number` | Yes | y-coordinate of the second control point |
| `radius` | `number` | Yes | Radius of the arc |

### Return Value

None


### Examples

#### Draw an arc path

```ts
const ctx = ty.createCanvasContext('myCanvas');
ctx.beginPath();
ctx.moveTo(20, 20);
ctx.arcTo(100, 20, 100, 100, 50);
ctx.stroke();
ctx.draw();
```
