Add setFill and setStroke to Shapes
This rounds out the shape style sto be more consistent and make the `setFill` and `setStroke` methods available.
This commit is contained in:
@@ -200,6 +200,15 @@ class RegularShape extends ImageStyle {
|
|||||||
return this.fill_;
|
return this.fill_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the fill style.
|
||||||
|
* @param {import("./Fill.js").default} fill Fill style.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setFill(fill) {
|
||||||
|
this.fill_ = fill;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {HTMLCanvasElement} Image element.
|
* @return {HTMLCanvasElement} Image element.
|
||||||
*/
|
*/
|
||||||
@@ -309,6 +318,15 @@ class RegularShape extends ImageStyle {
|
|||||||
return this.stroke_;
|
return this.stroke_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the stroke style.
|
||||||
|
* @param {import("./Stroke.js").default} stroke Stroke style.
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
setStroke(stroke) {
|
||||||
|
this.stroke_ = stroke;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user