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

## CanvasContext.stroke

> [VERSION] Base Library >= 2.21.8

### Description

Stroke the current path

### Parameters

None


### Return Value

None


### Examples

#### Stroke the path

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