Esempio n. 1
0
        float GetMagnification(Graphics g, int width, int height)
        {
            float r = (float)height / (float)width;

            if (r <= BarCodeEAN13.AspectRatio)
            {   // height is the limiting value
                r = BarCodeEAN13.MmYFromPixel(g, height) / BarCodeEAN13.OptimalHeight;
            }
            else
            {   // width is the limiting value
                r = BarCodeEAN13.MmXFromPixel(g, width) / BarCodeEAN13.OptimalWidth;
            }
            // Set the magnification limits
            //    Specification says 80% to 200% magnification allowed
            if (r < .8f)
            {
                r = .8f;
            }
            else if (r > 2f)
            {
                r = 2;
            }

            return(r);
        }
Esempio n. 2
0
        BarCodeEAN13 _Ean13;        // the EAN-13 barcode object

        public BarCodeBookland()    // Need to be able to create an instance
        {
            _Ean13 = new BarCodeEAN13();
        }
Esempio n. 3
0
        BarCodeEAN13 _Ean13;        // the EAN-13 barcode object

        public BarCodeBookland()        // Need to be able to create an instance
        {
            _Ean13 = new BarCodeEAN13();
        }
Esempio n. 4
0
 internal BarCodeProperties(BarCodeEAN13 bc, XmlNode node)
 {
     _bc   = bc;
     _node = node;
 }
Esempio n. 5
0
 internal BarCodeProperties(BarCodeEAN13 bc, XmlNode node)
 {
     _bc = bc;
     _node = node;
 }
        string _ISBN; // ISBN number

        #endregion Fields

        #region Constructors

        // Need to be able to create an instance
        public BarCodeBookland()
        {
            _Ean13 = new BarCodeEAN13();
        }