Example #1
0
 internal AttributedIterator(AttributedString attrString)
 {
     this.attrString = attrString;
     begin           = 0;
     end             = attrString.text.Length;
     offset          = 0;
 }
Example #2
0
 internal AttributedIterator(AttributedString attrString,
                             AttributedCharacterIteratorAttribute[] attributes, int begin,
                             int end)
 {
     if (begin < 0 || end > attrString.text.Length || begin > end)
     {
         throw new ArgumentException();
     }
     this.begin      = begin;
     this.end        = end;
     offset          = begin;
     this.attrString = attrString;
     if (attributes != null)
     {
         HashSet <AttributedCharacterIteratorAttribute> set = new HashSet <AttributedCharacterIteratorAttribute>(
             /*(attributes.Length * 4 / 3) + 1*/);
         for (int i = attributes.Length; --i >= 0;)
         {
             set.Add(attributes[i]);
         }
         attributesAllowed = set;
     }
 }