Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        public static ShapeBase CreateBarcodeEntity(float scaleFactor)
        {
            LinearBarcode barcode = new LinearBarcode();

            barcode.Text         = "1234";
            barcode.Height       = 6 * scaleFactor;
            barcode.Width        = 12 * scaleFactor;
            barcode.Location.X   = -20 * scaleFactor;
            barcode.Location.Y   = 20 * scaleFactor;
            barcode.BarcodeType  = BarcodeType.Codabar;
            barcode.HatchPattern = BarcodeHatchPattern.CreateLineHatchPattern(0.025f * scaleFactor, true, true);
            barcode.Color        = Color.Black;

            return(barcode);
        }