Example #1
0
        /// <summary>Execute the placement</summary>
        /// <param name="nrow">number of rows</param>
        /// <param name="ncol">number of columns</param>
        /// <returns>array containing appropriate values for ECC200</returns>
        public static short[] DoPlacement(int nrow, int ncol)
        {
            int key = nrow * 1000 + ncol;

            short[] pc = cache.Get(key);
            if (pc != null)
            {
                return(pc);
            }
            iText.Barcodes.Dmcode.Placement p = new iText.Barcodes.Dmcode.Placement(nrow, ncol);
            p.Ecc200();
            cache.Put(key, p.array);
            return(p.array);
        }
Example #2
0
        public static short[] DoPlacement(int nrow, int ncol)
        {
            int key = nrow * 1000 + ncol;

            short[] pc = cache.Get(key);
            if (pc != null)
            {
                return(pc);
            }
            iText.Barcodes.Dmcode.Placement p = new iText.Barcodes.Dmcode.Placement();
            p.nrow  = nrow;
            p.ncol  = ncol;
            p.array = new short[nrow * ncol];
            p.Ecc200();
            cache[key] = p.array;
            return(p.array);
        }