Skip to content

Commit 758d261

Browse files
committed
Updated readme, added defaults
1 parent 7069fff commit 758d261

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { Canvas } = require('canvas-constructor');
1313

1414
new Canvas(300, 300)
1515
.setColor('#AEFD54')
16-
.fillRect(5, 5, 290, 290)
16+
.addRect(5, 5, 290, 290)
1717
.setColor('#FFAE23')
1818
.setTextFont('28px Impact')
1919
.addText('Hello World!', 130, 150)

src/canvas.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class CanvasConstructor {
242242
* @returns {CanvasConstructor}
243243
* @chainable
244244
*/
245-
addRoundImage(buffer, x, y, width, height, radius) {
245+
addRoundImage(buffer, x, y, width, height, radius = 10) {
246246
return this.addImage(buffer, x, y, width, height, { type: 'round', radius });
247247
}
248248

@@ -257,7 +257,7 @@ class CanvasConstructor {
257257
* @returns {CanvasConstructor}
258258
* @chainable
259259
*/
260-
addBevelImage(buffer, x, y, width, height, radius) {
260+
addBevelImage(buffer, x, y, width, height, radius = 10) {
261261
return this.addImage(buffer, x, y, width, height, { type: 'bevel', radius });
262262
}
263263

0 commit comments

Comments
 (0)