Skip to content

Commit

Permalink
fix: radial gradient ry check (#2631)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh authored Aug 5, 2021
1 parent b988d9d commit a0dd38a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/canvas/canvas-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ export class CanvasRenderer extends Renderer {
const y = getAbsoluteValue(position[position.length - 1], height);

const [rx, ry] = calculateRadius(backgroundImage, x, y, width, height);
if (rx > 0 && rx > 0) {
if (rx > 0 && ry > 0) {
const radialGradient = this.ctx.createRadialGradient(left + x, top + y, 0, left + x, top + y, rx);

processColorStops(backgroundImage.stops, rx * 2).forEach((colorStop) =>
Expand Down

0 comments on commit a0dd38a

Please sign in to comment.