TextSegmentCollection

TextSegmentCollection

Overview

TextSegmentCollection is a class in Aspose.PDF FOSS for .NET. Inherits from: System.Collections.Generic.IEnumerable<TextSegment>.

A 1-indexed collection of TextSegment objects belonging to a TextFragment.

This class declares 8 methods for TextSegmentCollection objects in .NET programs. Available methods include: Add, Clear, Contains, CopyTo, Delete, GetEnumerator, Remove, TextSegmentCollection. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Count, IsReadOnly, IsSynchronized, SyncRoot.

Properties

NameTypeAccessDescription
CountintReadNumber of segments.
IsReadOnlyboolReadGets the is read only.
IsSynchronizedboolReadGets the is synchronized.
SyncRootobjectReadGets the sync root.

Methods

SignatureDescription
TextSegmentCollection()Creates an empty segment collection that belongs to no fragment.
Add(segment: TextSegment)Adds a segment to the end of the collection and refreshes the owning fragment’s text; throws when segment is null.
Contains(item: TextSegment)Returns true when the collection contains the given segment.
CopyTo(array: TextSegment[], index: int)Copies the segments into array, starting at the zero-based index.
Remove(item: TextSegment)Removes the given segment and refreshes the owning fragment’s text; returns true when it was found.
Clear()Removes all segments and refreshes the owning fragment’s text.
Delete(index: int)Remove the segment at the 1-based index.
GetEnumerator()Calls GetEnumerator on this TextSegmentCollection instance.

See Also

 English