Example #1
0
 /// <summary>
 /// Gets the glyph's encoding bit width.
 /// </summary>
 /// <param name="glyph">The <see cref="T:Glyph"/> to be queried.</param>
 /// <returns>Number of bits used to encode the glyph.</returns>
 /// <remarks>
 /// By default this method returns the underlying encoding bit width.
 /// </remarks>
 protected virtual int GetGlyphEncodingBitCount(Glyph glyph)
 {
     return(EncodingBitCount);
 }
Example #2
0
 /// <summary>
 /// Gets the height of the glyph.
 /// </summary>
 /// <param name="glyph">A <see cref="T:Zen.Barcode.Glyph"/> to be queried.</param>
 /// <param name="barMinHeight">Minimum bar height in pixels.</param>
 /// <param name="barMaxHeight">Maximum bar height in pixels.</param>
 /// <returns>The height of associated glyph.</returns>
 /// <remarks>
 /// By default this method returns the maximum bar height.
 /// </remarks>
 protected virtual double GetGlyphHeight(Glyph glyph, double barMinHeight, double barMaxHeight)
 {
     return(barMaxHeight);
 }
Example #3
0
 /// <summary>
 /// Gets the height of the glyph.
 /// </summary>
 /// <param name="glyph">A <see cref="T:Zen.Barcode.Glyph"/> to be queried.</param>
 /// <param name="barMinHeight">Minimum bar height in pixels.</param>
 /// <param name="barMaxHeight">Maximum bar height in pixels.</param>
 /// <returns>The height of associated glyph.</returns>
 /// <remarks>
 /// By default this method returns the maximum bar height.
 /// </remarks>
 protected virtual int GetGlyphHeight(Glyph glyph, int barMinHeight, int barMaxHeight)
 {
     return(barMaxHeight);
 }
Example #4
0
        /// <summary>
        /// Gets the glyph's width encoding bit count.
        /// </summary>
        /// <param name="glyph">A <see cref="T:Zen.Barcode.Glyph"/> to be queried.</param>
        /// <returns>Number of bits needed to encode the width of the glyph.</returns>
        /// <remarks>
        /// By default this method returns the underlying width bit count.
        /// </remarks>
        protected virtual int GetWidthBitCount(Glyph glyph)
        {
            int widthBitCount = this.WidthBitCount;

            return(widthBitCount);
        }
 /// <summary>
 /// Overridden. Gets the glyph's encoding bit width.
 /// </summary>
 /// <param name="glyph">The <see cref="T:Glyph"/> to be queried.</param>
 /// <returns>Number of bits used to encode the glyph.</returns>
 /// <exception cref="T:InvalidCastException">
 /// If the passed glyph is not derived from <see cref="T:BinaryPitchVaryLengthGlyph"/>.
 /// </exception>
 protected override int GetGlyphEncodingBitCount(Glyph glyph)
 {
     return(((BinaryPitchVaryLengthGlyph)glyph).BitEncodingWidth);
 }