diff --git a/package-lock.json b/package-lock.json index f77c593a..335eaa22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "qr-code-styling", - "version": "1.3.4", + "version": "1.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 490d4472..4d9930a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qr-code-styling", - "version": "1.4.0-rc1", + "version": "1.4.0", "description": "Add a style and an image to your QR code", "main": "lib/qr-code-styling.js", "types": "lib/index.d.ts", diff --git a/src/figures/cornerSquare/svg/QRCornerSquare.ts b/src/figures/cornerSquare/svg/QRCornerSquare.ts index 3db21973..01601cd1 100644 --- a/src/figures/cornerSquare/svg/QRCornerSquare.ts +++ b/src/figures/cornerSquare/svg/QRCornerSquare.ts @@ -71,12 +71,11 @@ export default class QRCornerSquare { this._element.setAttribute("clip-rule", "evenodd"); this._element.setAttribute( "d", - `M ${x + size / 2} ${y + size / 2}` + // M cx, cy // Move to center of ring - `m ${0} ${-size / 2}` + // m 0, -outerRadius // Move to top of ring - `a ${size / 2} ${size / 2} 0 1 0 1 0` + // a outerRadius, outerRadius, 0, 1, 0, 1, 0 // Draw outer arc, but don't close it + `M ${x + size / 2} ${y}` + // M cx, y // Move to top of ring + `a ${size / 2} ${size / 2} 0 1 0 0.1 0` + // a outerRadius, outerRadius, 0, 1, 0, 1, 0 // Draw outer arc, but don't close it `z` + // Z // Close the outer shape `m 0 ${dotSize}` + // m -1 outerRadius-innerRadius // Move to top point of inner radius - `a ${size / 2 - dotSize} ${size / 2 - dotSize} 0 1 1 -1 0` + // a innerRadius, innerRadius, 0, 1, 1, -1, 0 // Draw inner arc, but don't close it + `a ${size / 2 - dotSize} ${size / 2 - dotSize} 0 1 1 -0.1 0` + // a innerRadius, innerRadius, 0, 1, 1, -1, 0 // Draw inner arc, but don't close it `Z` // Z // Close the inner ring. Actually will still work without, but inner ring will have one unit missing in stroke ); }