Skip to content

Commit

Permalink
Updated readme, added defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranet committed Aug 6, 2017
1 parent 7069fff commit 758d261
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { Canvas } = require('canvas-constructor');

new Canvas(300, 300)
.setColor('#AEFD54')
.fillRect(5, 5, 290, 290)
.addRect(5, 5, 290, 290)
.setColor('#FFAE23')
.setTextFont('28px Impact')
.addText('Hello World!', 130, 150)
Expand Down
4 changes: 2 additions & 2 deletions src/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class CanvasConstructor {
* @returns {CanvasConstructor}
* @chainable
*/
addRoundImage(buffer, x, y, width, height, radius) {
addRoundImage(buffer, x, y, width, height, radius = 10) {
return this.addImage(buffer, x, y, width, height, { type: 'round', radius });
}

Expand All @@ -257,7 +257,7 @@ class CanvasConstructor {
* @returns {CanvasConstructor}
* @chainable
*/
addBevelImage(buffer, x, y, width, height, radius) {
addBevelImage(buffer, x, y, width, height, radius = 10) {
return this.addImage(buffer, x, y, width, height, { type: 'bevel', radius });
}

Expand Down

0 comments on commit 758d261

Please sign in to comment.