Skip to content

Commit

Permalink
Merge pull request #1145 from tommadams/fillRect
Browse files Browse the repository at this point in the history
Don't stroke rectangles drawn with fillRect
  • Loading branch information
0xfe authored Oct 1, 2021
2 parents 660f488 + bc0aa76 commit 55a55fd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/svgcontext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,8 @@ export class SVGContext implements RenderContext {
}

fillRect(x: number, y: number, width: number, height: number): this {
if (height < 0) {
y += height;
height *= -1;
}

this.rect(x, y, width, height, this.attributes);
const attributes = { fill: this.attributes.fill };
this.rect(x, y, width, height, attributes);
return this;
}

Expand Down

0 comments on commit 55a55fd

Please sign in to comment.