import React, {useEffect, useState} from "react";
import {getGrayPointList, rand} from "../../utils/util";
import {ParamTypes} from "../../constant/ParamTypes";
import {getTypeTable, QRPointType} from "../../utils/qrcodeHandler";
function listPoints(qrcode, params) {
if (!qrcode) return []
const nCount = qrcode.getModuleCount();
const typeTable = getTypeTable(qrcode);
const pointList = new Array(nCount);
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 (qrcode.isDark(x, y)) {
pointList.push()
} else {
pointList.push()
}
} else if (typeTable[x][y] == QRPointType.POS_CENTER) {
if (qrcode.isDark(x, y)) {
pointList.push(