Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Code128Glyph"/> class.
 /// </summary>
 /// <param name="first">A <see cref="T:Code128SpecialGlyph"/>
 /// representing the first set object.</param>
 /// <param name="second">The second set character.</param>
 /// <param name="third">The third set character.</param>
 /// <param name="bitEncoding">The glyph bit encoding.</param>
 public Code128Glyph(Code128SpecialGlyph first, char second, char third, short bitEncoding)
     : base(new char[] { (char)0, second, third }, bitEncoding)
 {
     if (first == Code128SpecialGlyph.None)
     {
         throw new ArgumentException("first cannot be None.");
     }
     _special = new Code128SpecialGlyph[]
     {
         first,
         Code128SpecialGlyph.None,
         Code128SpecialGlyph.None
     };
 }
Exemple #2
0
 private int GetSetIndex(int set, char character, Code128SpecialGlyph special)
 {
     GetGlyphs();
     for (int index = 0; index < _glyphs.Length; ++index)
     {
         if ((special != Code128SpecialGlyph.None &&
              _glyphs[index].GetSpecialBySet(set) == special) ||
             (special == Code128SpecialGlyph.None &&
              _glyphs[index].GetCharacterBySet(set) == character))
         {
             return(index);
         }
     }
     return(-1);
 }
Exemple #3
0
 private int GetSetIndex(int set, Code128SpecialGlyph special)
 {
     return(GetSetIndex(set, (char)0, special));
 }
Exemple #4
0
 private bool IsInSet(int set, Code128SpecialGlyph special)
 {
     return(GetSetIndex(set, (char)0, special) != -1);
 }