From 4fa9dae189a22aca8f60907d040d0d99209692f8 Mon Sep 17 00:00:00 2001
From: ciaochaos <1272777550@qq.com>
Date: Thu, 14 May 2020 22:07:02 +0800
Subject: [PATCH] =?UTF-8?q?ResImage=20=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/renderer/RendererImage.js | 1 -
src/components/renderer/RendererResImage.js | 54 +++++++++++++++++++--
2 files changed, 50 insertions(+), 5 deletions(-)
diff --git a/src/components/renderer/RendererImage.js b/src/components/renderer/RendererImage.js
index b71adb6..c2a5e2f 100644
--- a/src/components/renderer/RendererImage.js
+++ b/src/components/renderer/RendererImage.js
@@ -102,7 +102,6 @@ function getParamInfo() {
choices: [
"矩形",
"圆形",
- "随机"
]
},
{
diff --git a/src/components/renderer/RendererResImage.js b/src/components/renderer/RendererResImage.js
index d12c434..f3c4887 100644
--- a/src/components/renderer/RendererResImage.js
+++ b/src/components/renderer/RendererResImage.js
@@ -9,16 +9,40 @@ function listPoints(qrcode, params) {
const nCount = qrcode.getModuleCount();
const typeTable = getTypeTable(qrcode);
const pointList = new Array(nCount);
+ let alignType = params[1];
+ let timingType = params[2];
let id = 0;
for (let x = 0; x < nCount; x++) {
for (let y = 0; y < nCount; y++) {
const posX = 3 * x, posY = 3 * y;
- if (typeTable[x][y] == QRPointType.ALIGN_CENTER || typeTable[x][y] == QRPointType.ALIGN_OTHER || typeTable[x][y] == QRPointType.TIMING) {
+ if (typeTable[x][y] == QRPointType.ALIGN_CENTER || typeTable[x][y] == QRPointType.ALIGN_OTHER) {
if (qrcode.isDark(x, y)) {
- pointList.push()
+ if (alignType === 2) {
+ pointList.push(