modern-canvas 0.27.11 → 0.27.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -6784,6 +6784,9 @@ var Y = class extends w {
|
|
|
6784
6784
|
isValid() {
|
|
6785
6785
|
return !!(this.enabled && (this.texture || this.animatedTexture || this.color || this.image === "viewport"));
|
|
6786
6786
|
}
|
|
6787
|
+
_resolveThemeColor(e) {
|
|
6788
|
+
return this._parent.tree?.resolveThemeColor(e) ?? e;
|
|
6789
|
+
}
|
|
6787
6790
|
draw() {
|
|
6788
6791
|
let { width: e, height: t } = this._parent.size, n = this._parent.context, r = { size: {
|
|
6789
6792
|
width: e,
|
|
@@ -6805,7 +6808,7 @@ var Y = class extends w {
|
|
|
6805
6808
|
width: e,
|
|
6806
6809
|
height: t
|
|
6807
6810
|
})
|
|
6808
|
-
}, n.fillStyle = i ?? this.color ?? "#000000FF";
|
|
6811
|
+
}, n.fillStyle = i ?? this._resolveThemeColor(this.color) ?? "#000000FF";
|
|
6809
6812
|
}
|
|
6810
6813
|
n.fill(r);
|
|
6811
6814
|
}
|
|
@@ -39,6 +39,8 @@ export declare class Element2DFill extends CoreObject implements NormalizedFill
|
|
|
39
39
|
protected _pipelineImageToCanvas(image: PipelineImage): HTMLCanvasElement | undefined;
|
|
40
40
|
protected _updateTexture(): Promise<void>;
|
|
41
41
|
isValid(): boolean;
|
|
42
|
+
/** Resolve `@token` theme colors lazily on draw, same as outline / text do. */
|
|
43
|
+
protected _resolveThemeColor<T = any>(value: T): T | string;
|
|
42
44
|
draw(): void;
|
|
43
45
|
protected _getFrameCurrentTime(): number;
|
|
44
46
|
updateFrameIndex(): this;
|