1.2.3 • Published 2 years ago

render-html-into-canvas v1.2.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Render HTML to Canvas

Render a HTML text template into a canvas context.

// To import
const drawHTML = require('render-html-into-canvas');

// To use
const canvas = yourCanvas;
const context = canvas.getContext('2d');

const input = "<b>Follow</b> the <i>train,</i> <b><i>CJ!</i></b><br><b>MOVE!</b>;

drawHTML(input, context, { fontFamily: 'Arial', fontSize: 16 });

// Available options
options: {
  fontFamily: 'string',
  fontSize: number,
  padding: number,
  posX: number,
  posY: number,
}
1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago