Esempio n. 1
0
        private static void AddDataMatrixBarcode(VectorImage vectorImage, DataMatrixBarcode dataMatrixBarcode, DistanceUnit currentUnit)
        {
            DataMatrixBarcodeShape barcode = new DataMatrixBarcodeShape();

            barcode.Text = dataMatrixBarcode.Text;

            barcode.DataMatrixFormat = dataMatrixBarcode.DataMatrixFormat;
            barcode.DataMatrixSize   = dataMatrixBarcode.DataMatrixSize;

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

            barcode.FlipHorizontally = dataMatrixBarcode.FlipHorizontally;
            barcode.FlipVertically   = dataMatrixBarcode.FlipVertically;
            barcode.MarkingOrder     = dataMatrixBarcode.MarkingOrder;

            barcode.Angle = dataMatrixBarcode.Angle;

            barcode.HatchPattern = dataMatrixBarcode.HatchPattern;
            barcode.Location     = dataMatrixBarcode.Location.Clone();
            vectorImage.AddBarcodeShape(barcode);
        }
Esempio n. 2
0
        public static ShapeBase CreateDataMatrixEntity(float scaleFactor)
        {
            DataMatrixBarcode dataMatrix = new DataMatrixBarcode();

            dataMatrix.Text           = "1";
            dataMatrix.Height         = 10 * scaleFactor;
            dataMatrix.DataMatrixSize = DataMatrixSize.S16x16;
            dataMatrix.AutoExpand     = true;
            dataMatrix.Location.X     = 10 * scaleFactor;
            dataMatrix.Location.Y     = -10 * scaleFactor;
            dataMatrix.HatchPattern   = BarcodeHatchPattern.CreateLineHatchPattern(0.25f * scaleFactor, true, true);
            dataMatrix.Color          = Color.YellowGreen;

            return(dataMatrix);
        }