Skip to content

Commit 1e503d8

Browse files
committed
Added a list of methods, bumped version to 0.1.7
1 parent c7baf9e commit 1e503d8

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

METHODS.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This package has the following methods:
2+
3+
| Method | Parameters
4+
|---------------------:|-----------
5+
| changeCanvasSize | `width`, `height`
6+
| changeCanvasWidth | `width`
7+
| changeCanvasHeigth | `height`
8+
| save |
9+
| restore |
10+
| rotate | `angle`
11+
| scale | `x`, `y`
12+
| traslate | `x`, `y`
13+
| fill | `path`, `fillRule`
14+
| addRect | `x`, `y`, `width`, `height`
15+
| addText | `text`, `x`, `y`, `maxWidth`
16+
| stroke | `path`
17+
| addStrokeRect | `x`, `y`, `width`, `height`
18+
| addStrokeText | `text`, `x`, `y`
19+
| measureText | `text`, `callback`
20+
| setStroke | `color = '#000000'`
21+
| setStrokeWidth | `width = 1`
22+
| addImage | `buffer`, `x`, `y`, `width`, `height`, `options = {}`
23+
| addRoundImage | `buffer`, `x`, `y`, `width`, `height`, `radius = 10`
24+
| addBevelImage | `buffer`, `x`, `y`, `width`, `height`, `radius = 10`
25+
| createRoundClip | `x`, `y`, `radius`, `start = 0`, `angle = Math.PI * 2`
26+
| createBeveledClip | `x`, `y`, `width`, `height`, `radius`
27+
| addTextFont | `path`, `family`
28+
| setColor | `color`
29+
| setTextFont | `font`
30+
| setTextAlign | `align`
31+
| setTextBaseline | `baseline`
32+
| beginPath |
33+
| closePath |
34+
| createLinearGradient | `x0`, `y0`, `x1`, `y1`
35+
| createRadialGradient | `x0`, `y0`, `r0`, `x1`, `y1`, `r1`
36+
| arc | `x`, `y`, `radius`, `startAngle`, `endAngle`, `anticlockwise = false`
37+
| arcTo | `x1`, `y1`, `x2`, `y2`, `radius`
38+
| quadraticCurveTo | `cpx`, `cpy`, `x`, `y`
39+
| bezierCurveTo | `cp1x`, `cp1y`, `cp2x`, `cp2y`, `x`, `y`
40+
| lineTo | `x`, `y`
41+
| moveTo | `x`, `y`
42+
| setShadowBlur | `radius`
43+
| setShadowColor | `color`
44+
| setShadowOffsetX | `value`
45+
| setShadowOffsetY | `value`
46+
| setGlobalAlpha | `value`
47+
| resetShadows |
48+
| clearCircle | `x`, `y`, `radius`, `start = 0`, `angle = Math.PI * 2`
49+
| clearPixels | `x = 0`, `y = 0`, `width = this.width`, `height = this.height`
50+
| toBuffer | `options`

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ async function createCanvas() {
5959
And now, you have created an image with a kitten in the background and some centered text in the bottom of it.
6060

6161
If you experience issues with **Canvas** or want to install it, please refer to the [canvas](https://www.npmjs.com/package/canvas) repository, if you feel you found an issue in this package, feel free to file an issue [here](https://github.com/kyranet/canvasConstructor/issues), or make a [Pull Request](https://help.github.com/articles/about-pull-requests/) if you have the fix.
62+
63+
Additionally, you can check all the methods this package has [here](https://github.com/kyranet/canvasConstructor/METHODS.md).

examples/.createFolder

Whitespace-only changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "canvas-constructor",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "A ES6 class for node-canvas with built-in functions and chained methods.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)