Esempio n. 1
0
        // constructor
        public AttributedStringIterator(Attributes[] attributes, int beginIndex, int endIndex, AttributedString aString)
        {
            attString = aString;

            if (beginIndex < 0 || beginIndex > endIndex || endIndex > attString.Length())
            {
                throw new ArgumentException("Invalid substring range");
            }

            this.beginIndex   = beginIndex;
            this.endIndex     = endIndex;
            this.currentIndex = beginIndex;
            UpdateRunInfo();
            if (attributes != null)
            {
                relevantAttributes = (Attributes[])attributes.Clone();
            }
        }