2.0.2 • Published 3 years ago

canvas-autograph v2.0.2

Weekly downloads
64
License
MIT
Repository
github
Last release
3 years ago

canvas-autograph

NPM version

Install

npm install canvas-autograph
yarn add canvas-autograph

Usage

import Autograph from 'canvas-autograph';

new Autograph(options);

API

options configuration

ParamsDescTypesRequiredDefault
elspecify the rendered dom element selectorstringyes-
fontset the font of the canvas textstringno'14px Arial'
alphaset the transparency of the canvasnumberno1
imgTypeset the type of generated imagestringno'png'
offsetXset the x axis offset of the pathnumberno0
offsetYset the y axis offset of the pathnumberno0
fillColorset the fill colorstringno'#fff'
lineWidthset line widthnumberno3
strokeColorset path colorstringno'#000'

instance method

FunctionDescCallback Parameter
onSaveUrlsave picture(color) => Promise
onClearclear canvas() => void
destroydestroy the instance() => void
2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago