Skip to content

Commit

Permalink
Merge pull request #1772 from squoddam/fix-fill-type-gradient
Browse files Browse the repository at this point in the history
Update `fill` type to accept `CanvasGradient`
  • Loading branch information
lavrton authored Jun 4, 2024
2 parents 68b4ea3 + 52977b5 commit cb0cbbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -766,7 +766,7 @@ export class Shape<
dash: GetSet<number[], this>;
dashEnabled: GetSet<boolean, this>;
dashOffset: GetSet<number, this>;
fill: GetSet<string, this>;
fill: GetSet<string | CanvasGradient, this>;
fillEnabled: GetSet<boolean, this>;
fillLinearGradientColorStops: GetSet<Array<number | string>, this>;
fillLinearGradientStartPoint: GetSet<Vector2d, this>;
Expand Down Expand Up @@ -815,7 +815,7 @@ export class Shape<
shadowOffsetY: GetSet<number, this>;
shadowOpacity: GetSet<number, this>;
shadowBlur: GetSet<number, this>;
stroke: GetSet<string, this>;
stroke: GetSet<string | CanvasGradient, this>;
strokeEnabled: GetSet<boolean, this>;
fillAfterStrokeEnabled: GetSet<boolean, this>;
strokeScaleEnabled: GetSet<boolean, this>;
Expand Down

0 comments on commit cb0cbbf

Please sign in to comment.