iTextSharp.text.pdf.qrcode.Version.GetVersionNumber C# (CSharp) Method

GetVersionNumber() public method

public GetVersionNumber ( ) : int
return int
        public int GetVersionNumber() {
            return versionNumber;
        }

Usage Example

示例#1
0
        /**
         * @param version version in question
         * @return number of bits used, in this QR Code symbol {@link Version}, to encode the
         *         count of characters that will follow encoded in this {@link Mode}
         */
        public int GetCharacterCountBits(Version version)
        {
            if (characterCountBitsForVersions == null)
            {
                throw new ArgumentException("Character count doesn't apply to this mode");
            }
            int number = version.GetVersionNumber();
            int offset;

            if (number <= 9)
            {
                offset = 0;
            }
            else if (number <= 26)
            {
                offset = 1;
            }
            else
            {
                offset = 2;
            }
            return(characterCountBitsForVersions[offset]);
        }
All Usage Examples Of iTextSharp.text.pdf.qrcode.Version::GetVersionNumber