Beispiel #1
0
        private QRMaskPattern GetBestMaskPattern()
        {
            double        num           = 0.0;
            QRMaskPattern qrMaskPattern = QRMaskPattern.PATTERN000;

            for (int index = 0; index < 8; index++)
            {
                this.MakeImpl(true, (QRMaskPattern)index);
                double lostPoint = QRUtil.GetLostPoint(this);
                bool   flag      = index == 0 || num > lostPoint;
                if (flag)
                {
                    num           = lostPoint;
                    qrMaskPattern = (QRMaskPattern)index;
                }
            }
            return(qrMaskPattern);
        }
Beispiel #2
0
        internal int getBestMaskPattern()
        {
            double num  = 0.0;
            int    num2 = 0;

            for (int index = 0; index < 8; index++)
            {
                this.MakeImpl(true, (QRMaskPattern)index);
                double lostPoint = QRUtil.GetLostPoint(this);
                bool   flag      = index == 0 || num > lostPoint;
                if (flag)
                {
                    num  = lostPoint;
                    num2 = index;
                }
            }
            return(num2);
        }