Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/riccardoscalco/canvas-fill-text-on-arc

Utility function for drawing text on an arc using the canvas API.
https://github.com/riccardoscalco/canvas-fill-text-on-arc

arc browser canvas circle html5 text

Last synced: 2 days ago
JSON representation

Utility function for drawing text on an arc using the canvas API.

Awesome Lists containing this project

README

        

# canvas-fill-text-on-arc

Utility function for drawing text on an arc using the canvas API.

## Install

```sh
npm install canvas-fill-text-on-arc
```

## Usage

```js
import fillTextOnArc from 'canvas-fill-text-on-arc';

// Set font
context.font = 'normal 14px serif';

// Draw text
fillTextOnArc(
context,
'some text',
cx,
cy,
radius,
spacing
);
```