From 01f4bb605e1cee8c68cbfc1474c5b920a6a9c33b Mon Sep 17 00:00:00 2001 From: Elazar Kopyrin Date: Mon, 3 Jun 2024 20:20:05 +0300 Subject: [PATCH 1/2] Update `fill` type to accpet `CanvasGradient` --- src/Shape.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Shape.ts b/src/Shape.ts index 6f403878..8d5a27ff 100644 --- a/src/Shape.ts +++ b/src/Shape.ts @@ -26,7 +26,7 @@ export type LineJoin = 'round' | 'bevel' | 'miter'; export type LineCap = 'butt' | 'round' | 'square'; export interface ShapeConfig extends NodeConfig { - fill?: string; + fill?: string | CanvasGradient; fillPatternImage?: HTMLImageElement; fillPatternX?: number; fillPatternY?: number; From 52977b5c0c98007ee890555ed58aaa8f9f47cc5a Mon Sep 17 00:00:00 2001 From: Elazar Kopyrin Date: Mon, 3 Jun 2024 22:18:08 +0300 Subject: [PATCH 2/2] Update `fill` and `stroke` GetSet type to accept `CanvasGradient` --- src/Shape.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Shape.ts b/src/Shape.ts index 8d5a27ff..de9ef070 100644 --- a/src/Shape.ts +++ b/src/Shape.ts @@ -766,7 +766,7 @@ export class Shape< dash: GetSet; dashEnabled: GetSet; dashOffset: GetSet; - fill: GetSet; + fill: GetSet; fillEnabled: GetSet; fillLinearGradientColorStops: GetSet, this>; fillLinearGradientStartPoint: GetSet; @@ -815,7 +815,7 @@ export class Shape< shadowOffsetY: GetSet; shadowOpacity: GetSet; shadowBlur: GetSet; - stroke: GetSet; + stroke: GetSet; strokeEnabled: GetSet; fillAfterStrokeEnabled: GetSet; strokeScaleEnabled: GetSet;