CPatchane 2023-12-28 14:45:39 +01:00
parent a8efcd554a
commit 467147b4c7
2 changed files with 14 additions and 0 deletions

View File

@ -58,6 +58,7 @@ var COMMA = ',',
'putImageData',
'quadraticCurveTo',
'rect',
'roundRect',
'restore',
'rotate',
'save',
@ -586,6 +587,18 @@ export class Context {
rect(x: number, y: number, width: number, height: number) {
this._context.rect(x, y, width, height);
}
/**
* roundRect function.
* @method
* @name Konva.Context#roundRect
*/
roundRect(x: number, y: number, width: number, height: number, radii: number) {
if (this._context.roundRect) {
this._context.roundRect(x, y, width, height, radii);
} else {
this._context.rect(x, y, width, height);
}
}
/**
* putImageData function.
* @method

View File

@ -22,6 +22,7 @@ describe('Context', function () {
'arc',
'arcTo',
'rect',
'roundRect',
'ellipse',
'fill',
'stroke',