From a0dd38a8be4e540ae1c1f4b4e41f6c386f3e454f Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Thu, 5 Aug 2021 14:07:10 +0800 Subject: [PATCH] fix: radial gradient ry check (#2631) --- src/render/canvas/canvas-renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/canvas/canvas-renderer.ts b/src/render/canvas/canvas-renderer.ts index 12d2a60..2c4ded1 100644 --- a/src/render/canvas/canvas-renderer.ts +++ b/src/render/canvas/canvas-renderer.ts @@ -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) =>