mirror of
https://fietkau.software/QRSVG.git
synced 2024-10-06 19:41:17 -05:00
Bugfix: larger quiet zones than 1 no longer erase internal parts of the code
This commit is contained in:
parent
92076c91fc
commit
937562a8b8
|
@ -1,7 +1,7 @@
|
||||||
/** SPDX-License-Identifier: MIT
|
/** SPDX-License-Identifier: MIT
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* QRSVG
|
* QRSVG
|
||||||
* Version 1.0
|
* Version 1.0.1
|
||||||
* https://fietkau.software/qr
|
* https://fietkau.software/qr
|
||||||
* Copyright (c) Julian Fietkau
|
* Copyright (c) Julian Fietkau
|
||||||
*
|
*
|
||||||
|
@ -249,9 +249,9 @@ function calculateDotsOrMosaicContour(bitmask, margin, style) {
|
||||||
for(let x = 0; x < bitmask.width; x++) {
|
for(let x = 0; x < bitmask.width; x++) {
|
||||||
if(bitmask.width > 16 && bitmask.height > 16) {
|
if(bitmask.width > 16 && bitmask.height > 16) {
|
||||||
// Check if we are inside a PDP area, because they have already been handled separately.
|
// Check if we are inside a PDP area, because they have already been handled separately.
|
||||||
if((x < 7 + margin && y < 7 + margin) ||
|
if((x < 8 && y < 8) ||
|
||||||
(x < 7 + margin && y > bitmask.height - margin - 7) ||
|
(x < 8 && y > bitmask.height - 8) ||
|
||||||
(x > bitmask.width - margin - 7 && y < 7 + margin)) {
|
(x > bitmask.width - 8 && y < 8)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -367,9 +367,9 @@ function calculateShapeContour(bitmask, margin, style) {
|
||||||
for(let x = 0; x < width; x++) {
|
for(let x = 0; x < width; x++) {
|
||||||
if(bitmask.width > 16 && bitmask.height > 16) {
|
if(bitmask.width > 16 && bitmask.height > 16) {
|
||||||
// Check if we are inside a PDP area, because they have already been handled separately.
|
// Check if we are inside a PDP area, because they have already been handled separately.
|
||||||
if((x < 7 + margin && y < 7 + margin) ||
|
if((x < 8 && y < 8) ||
|
||||||
(x < 7 + margin && y > bitmask.height - margin - 7) ||
|
(x < 8 && y > bitmask.height - 8) ||
|
||||||
(x > bitmask.width - margin - 7 && y < 7 + margin)) {
|
(x > bitmask.width - 8 && y < 8)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user