Beispiel #1
0
        private static void AddQRCodeBarcode(VectorImage vectorImage, QRCodeBarcode qrCodeBarcode, DistanceUnit currentUnit)
        {
            QRCodeBarcodeShape barcode = new QRCodeBarcodeShape();

            barcode.Text = qrCodeBarcode.Text;

            barcode.ErrorCorrectionLevel = qrCodeBarcode.ErrorCorrectionLevel;
            barcode.CodeSize             = qrCodeBarcode.CodeSize;
            barcode.EncodingMode         = qrCodeBarcode.EncodingMode;
            barcode.MaskPattern          = qrCodeBarcode.MaskPattern;

            barcode.Height      = qrCodeBarcode.Height;
            barcode.InvertImage = qrCodeBarcode.InvertImage;
            barcode.QuietZone   = qrCodeBarcode.QuietZone;
            barcode.Height      = qrCodeBarcode.Height;
            barcode.AutoExpand  = qrCodeBarcode.AutoExpand;

            barcode.FlipHorizontally = qrCodeBarcode.FlipHorizontally;
            barcode.FlipVertically   = qrCodeBarcode.FlipVertically;
            barcode.MarkingOrder     = qrCodeBarcode.MarkingOrder;

            barcode.Angle = qrCodeBarcode.Angle;

            barcode.HatchPattern = qrCodeBarcode.HatchPattern;
            barcode.Location     = qrCodeBarcode.Location.Clone();
            vectorImage.AddBarcodeShape(barcode);
        }
Beispiel #2
0
        public static ShapeBase CreateQRCodeEntity(float scaleFactor)
        {
            QRCodeBarcode qrcode = new QRCodeBarcode();

            qrcode.Text       = "1";
            qrcode.Height     = 10 * scaleFactor;
            qrcode.CodeSize   = QRCodeSize.S21x21;
            qrcode.AutoExpand = true;
            qrcode.Location.X = -25 * scaleFactor;
            qrcode.Location.Y = -25 * scaleFactor;
            qrcode.Color      = Color.Cyan;

            return(qrcode);
        }