Releases: kyranet/canvas-constructor
Releases · kyranet/canvas-constructor
canvas-constructor@1.1.1
Fixed
- Fixed
addCircularImage()
not adding a circule clip before adding the image.
canvas-constructor@1.1.0
Added
- Added
toDataURL()
andtoDataURLAsync()
. - Added
addCircularImage()
, similar toaddCircle()
. - Added
setTextSize()
, similar tosetTextFont()
but changes the font size only (not the font itself). - Added all overloads for
addImage()
. - (Documentation) Added MDN link for
addImage()
.
Changed
createBeveledPath()
now accepts an object typeBeveledRadiusOptions
.- Renamed
addBevelImage()
toaddBeveledImage()
to prevent confusions (naming inconsistency). The old method is still available but it's deprecated and will be removed in the next major update.
canvas-constructor@0.4.0
Added
addMultilineText()
to print texts that are too long to be displayed.
canvas-constructor@0.3.1
Added
- Both
printLinearGradient()
andprintRadialGradient()
to have chainable methods. - Added a new parameter for both
createLinearGradient()
andcreateRadialGradient()
, steps, which is typeofGradientStep[]
.
Changed
- Both
createLinearGradient()
andcreateRadialGradient()
are not longer chainable, they'll returnCanvasGradient
instead.
canvas-constructor@0.3.0
Added
- Typings. This package will also work in TypeScript.
createBeveledPath()
same usage ascreateBeveledClip()
, but does not create clips (so you can use shadows and fill to colourize it).createRoundPath()
same usage ascreateRoundClip()
, but does not create clips (so you can use shadows and fill to colourize it).clip()
(how come this was not implemented?).
Changed
- Canvas has been moved from dependency to peer dependency.
canvas-constructor@0.2.0
Changed
addResponsiveText()
changed the parser to be passive, faster, and more accurate.
Removed
- Two private methods that were being used in
setTextFont()
.
canvas-constructor@0.1.7
Added
changeCanvasSize()
to change the canvas' width/height.changeCanvasWidth()
to change the canvas' width.changeCanvasHeigth()
to change the canvas' heigth.
Removed
registerTextFont()
as canvas-constructor relies on Canvas 1.6.6, this method is useless.
canvas-constructor@0.1.6
Added
setStrokeWidth()
to change stroke/line's width.beginPath()
to start making paths.closePath()
to start closing paths.createLinearGradient()
to create linear gradients.createRadialGradient()
to create radial gradients.arc()
andarcTo()
, to create arcs.quadraticCurveTo()
to create quadratic Bèzier curves.bezierCurveTo()
to create cubic Bèzier curves.lineTo()
to connect lines.moveTo()
to move the starting point of a path to any (x, y) coordinates.
Changed
- Added default
'#000000'
for thesetStroke()
method. addImage()
removedthis.save()
andthis.restore()
so users can use their own paths.
Fixed
- Examples for
measureText()
.
canvas-constructor@0.1.5
Added
save()
To save the current state onto a stack.rotate()
To add a rotation to the transformation matrix.scale()
To perform scaling transformations.traslate()
To perform translating transformations.fill()
To fill the current/given path.stroke()
To stroke the current/given path.addStrokeText()
To add stroked text.measureText()
To measure in pixels a text. Be careful, if you do not
provide a callback (second argument), this method will return an Integer value
instead of being chainable.setTextBaseline()
To set the text's baseline.setShadowOffsetX()
To set the shadow offset for the axis X.setShadowOffsetY()
To set the shadow offset for the axis Y.setGlobalAlpha()
To set the global alpha value for the next elements.clearCircle()
To clear the pixels with a circle shape.clearPixels()
To clear the pixels with a rectangle shape. (Usage is
identical toaddRect()
).
Changed
- Breaking |
fillRect()
->addRect()
| To keep consistency. addText()
now accepts a third argument:maxWidth
.addImage()
now saves and restores the context.
Fixed
addRoundImage()
now points toaddImage()
with the correct arguments.addBevelImage()
now points toaddImage()
with the correct arguments.
canvas-constructor@0.1.4
Fixed
- Re-organized the badges