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

## CanvasContext.quadraticCurveTo

> [VERSION] Base Library >= 2.21.8

### Description

Create a quadratic Bezier curve path

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `cpx` | `number` | Yes | x-coordinate of the Bezier control point |
| `cpy` | `number` | Yes | y-coordinate of the Bezier control point |
| `x` | `number` | Yes | x-coordinate of the end point |
| `y` | `number` | Yes | y-coordinate of the end point |

### Return Value

None


### Examples

#### Draw a quadratic Bezier curve

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