fix(webgl): pass radix 10 for SVG arc flag parsing
CustomGlyphRasterizer parsed large-arc and sweep flags with parseInt without a radix when drawing SVG arc paths. Use base 10 for 0/1 flags. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -221,8 +221,8 @@ function drawPathDefinitionCharacter(
|
||||
const rx = parseFloat(args[0]) * deviceCellWidth;
|
||||
const ry = parseFloat(args[1]) * deviceCellHeight;
|
||||
const xAxisRotation = parseFloat(args[2]) * Math.PI / 180;
|
||||
const largeArcFlag = parseInt(args[3]);
|
||||
const sweepFlag = parseInt(args[4]);
|
||||
const largeArcFlag = parseInt(args[3], 10);
|
||||
const sweepFlag = parseInt(args[4], 10);
|
||||
const x = xOffset + parseFloat(args[5]) * deviceCellWidth;
|
||||
const y = yOffset + parseFloat(args[6]) * deviceCellHeight;
|
||||
drawSvgArc(ctx, currentX, currentY, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y);
|
||||
|
||||
Reference in New Issue
Block a user