GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfLineSegmentCollection Class

    Namespace:
    GemBox.Pdf.Content
    Assembly:
    GemBox.Pdf.dll

    Represents a collection of PdfLineSegments.

    • C#
    • VB.NET
    public sealed class PdfLineSegmentCollection : IList<PdfLineSegment>, ICollection<PdfLineSegment>, IEnumerable<PdfLineSegment>, IEnumerable
    Public NotInheritable Class PdfLineSegmentCollection
        Implements IList(Of PdfLineSegment), ICollection(Of PdfLineSegment), IEnumerable(Of PdfLineSegment), IEnumerable
    Inheritance:
    System.Object
    PdfLineSegmentCollection
    Implements
    System.Collections.Generic.IList<PdfLineSegment>
    System.Collections.Generic.ICollection<PdfLineSegment>
    System.Collections.Generic.IEnumerable<PdfLineSegment>
    System.Collections.IEnumerable

    Properties

    Count

    Gets the number of PdfLineSegments contained in the PdfLineSegmentCollection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    The number of PdfLineSegments contained in the PdfLineSegmentCollection.

    Item[Int32]

    Gets or sets the PdfLineSegment at the specified index.

    • C#
    • VB.NET
    public PdfLineSegment this[int index] { get; set; }
    Public Property Item(index As Integer) As PdfLineSegment
    Parameters
    index
    System.Int32

    The zero-based index of the PdfLineSegment to get or set.

    Property Value
    PdfLineSegment

    The PdfLineSegment at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or index is equal to or greater than Count.

    Methods

    Add(PdfLineSegment)

    Adds a PdfLineSegment to the end of the PdfLineSegmentCollection.

    • C#
    • VB.NET
    public void Add(PdfLineSegment lineSegment)
    Public Sub Add(lineSegment As PdfLineSegment)
    Parameters
    lineSegment
    PdfLineSegment

    The PdfLineSegment to be added to the end of the PdfLineSegmentCollection.

    Clear()

    Removes all PdfLineSegments from the PdfLineSegmentCollection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(PdfLineSegment)

    Determines whether a PdfLineSegment is in the PdfLineSegmentCollection.

    • C#
    • VB.NET
    public bool Contains(PdfLineSegment lineSegment)
    Public Function Contains(lineSegment As PdfLineSegment) As Boolean
    Parameters
    lineSegment
    PdfLineSegment

    The PdfLineSegment to locate in the PdfLineSegmentCollection.

    Returns
    System.Boolean

    true if lineSegment is found in the PdfLineSegmentCollection; otherwise, false.

    CopyTo(PdfLineSegment[], Int32)

    Copies the entire PdfLineSegmentCollection to a compatible one-dimensional array, starting at the specified index of the target array.

    • C#
    • VB.NET
    public void CopyTo(PdfLineSegment[] array, int arrayIndex)
    Public Sub CopyTo(array As PdfLineSegment(), arrayIndex As Integer)
    Parameters
    array
    PdfLineSegment[]

    The one-dimensional System.Array that is the destination of the PdfLineSegments copied from PdfLineSegmentCollection. The System.Array must have zero-based indexing.

    arrayIndex
    System.Int32

    The zero-based index in array at which copying begins.

    Exceptions
    System.ArgumentNullException

    array is null.

    System.ArgumentOutOfRangeException

    arrayIndex is less than 0 or greater than array's System.Array.Length.

    System.ArgumentException

    The number of PdfLineSegments in the source PdfLineSegmentCollection is greater than the available space from arrayIndex to the end of the destination array.

    GetEnumerator()

    Returns an enumerator that iterates through the PdfLineSegmentCollection.

    • C#
    • VB.NET
    public IEnumerator<PdfLineSegment> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of PdfLineSegment)
    Returns
    System.Collections.Generic.IEnumerator<PdfLineSegment>

    An System.Collections.Generic.IEnumerator<T> for the PdfLineSegmentCollection.

    IndexOf(PdfLineSegment)

    Searches for the specified PdfLineSegment and returns the zero-based index of the first occurrence within the entire PdfLineSegmentCollection.

    • C#
    • VB.NET
    public int IndexOf(PdfLineSegment lineSegment)
    Public Function IndexOf(lineSegment As PdfLineSegment) As Integer
    Parameters
    lineSegment
    PdfLineSegment

    The PdfLineSegment to locate in the PdfLineSegmentCollection.

    Returns
    System.Int32

    The zero-based index of the first occurrence of lineSegment within the entire PdfLineSegmentCollection, if found; otherwise, –1.

    Insert(Int32, PdfLineSegment)

    Inserts a PdfLineSegment into the PdfLineSegmentCollection at the specified index.

    • C#
    • VB.NET
    public void Insert(int index, PdfLineSegment lineSegment)
    Public Sub Insert(index As Integer, lineSegment As PdfLineSegment)
    Parameters
    index
    System.Int32

    The zero-based index at which lineSegment should be inserted.

    lineSegment
    PdfLineSegment

    The PdfLineSegment to insert.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or index is greater than Count.

    Remove(PdfLineSegment)

    Removes the first occurrence of a specific PdfLineSegment from the PdfLineSegmentCollection.

    • C#
    • VB.NET
    public bool Remove(PdfLineSegment lineSegment)
    Public Function Remove(lineSegment As PdfLineSegment) As Boolean
    Parameters
    lineSegment
    PdfLineSegment

    The PdfLineSegment to remove from the PdfLineSegmentCollection.

    Returns
    System.Boolean

    true if lineSegment is successfully removed; otherwise, false. This method also returns false if lineSegment was not found in the PdfLineSegmentCollection.

    RemoveAt(Int32)

    Removes the PdfLineSegment at the specified index of the PdfLineSegmentCollection.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the PdfLineSegment to remove.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than 0 or index is equal to or greater than Count.

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Examples

    Shapes (Paths) example

    See Also

    PDF Specification ISO 32000-1:2008, section '8.5 Path Construction and Painting'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.