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

    Show / Hide Table of Contents

    PdfSubpathCollection Class

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

    Represents a collection of PdfSubpaths.

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

    Properties

    Count

    Gets the number of PdfSubpaths contained in the PdfSubpathCollection.

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

    The number of PdfSubpaths contained in the PdfSubpathCollection.

    Item[Int32]

    Gets or sets the PdfSubpath at the specified index.

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

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

    Property Value
    PdfSubpath

    The PdfSubpath at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

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

    System.ArgumentNullException

    value is null.

    System.ArgumentException

    value is already contained in some PdfSubpathCollection. Use Clone() to create a copy that is not contained in any PdfSubpathCollection.

    Methods

    Add(PdfSubpath)

    Adds a PdfSubpath to the end of the PdfSubpathCollection.

    • C#
    • VB.NET
    public void Add(PdfSubpath subpath)
    Public Sub Add(subpath As PdfSubpath)
    Parameters
    subpath
    PdfSubpath

    The PdfSubpath to be added to the end of the PdfSubpathCollection.

    Exceptions
    System.ArgumentNullException

    subpath is null.

    System.ArgumentException

    subpath is already contained in some PdfSubpathCollection. Use Clone() to create a copy that is not contained in any PdfSubpathCollection.

    Clear()

    Removes all PdfSubpaths from the PdfSubpathCollection.

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

    Contains(PdfSubpath)

    Determines whether a PdfSubpath is in the PdfSubpathCollection.

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

    The PdfSubpath to locate in the PdfSubpathCollection.

    Returns
    System.Boolean

    true if subpath is found in the PdfSubpathCollection; otherwise, false.

    CopyTo(PdfSubpath[], Int32)

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

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

    The one-dimensional System.Array that is the destination of the PdfSubpaths copied from PdfSubpathCollection. 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 PdfSubpaths in the source PdfSubpathCollection is greater than the available space from arrayIndex to the end of the destination array.

    GetEnumerator()

    Returns an enumerator that iterates through the PdfSubpathCollection.

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

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

    IndexOf(PdfSubpath)

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

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

    The PdfSubpath to locate in the PdfSubpathCollection.

    Returns
    System.Int32

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

    Insert(Int32, PdfSubpath)

    Inserts a PdfSubpath into the PdfSubpathCollection at the specified index.

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

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

    subpath
    PdfSubpath

    The PdfSubpath to insert.

    Exceptions
    System.ArgumentOutOfRangeException

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

    System.ArgumentNullException

    subpath is null.

    System.ArgumentException

    subpath is already contained in some PdfSubpathCollection. Use Clone() to create a copy that is not contained in any PdfSubpathCollection.

    Remove(PdfSubpath)

    Removes a specific PdfSubpath from the PdfSubpathCollection.

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

    The PdfSubpath to remove from the PdfSubpathCollection.

    Returns
    System.Boolean

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

    RemoveAt(Int32)

    Removes the PdfSubpath at the specified index of the PdfSubpathCollection.

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

    The zero-based index of the PdfSubpath to remove.

    Exceptions
    System.ArgumentOutOfRangeException

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

    Transform(PdfMatrix)

    Transforms the StartPoint, ControlPoint1, ControlPoint2, and EndPoint of all PdfSubpaths and PdfLineSegments contained in the PdfSubpathCollection.

    • C#
    • VB.NET
    public void Transform(PdfMatrix transform)
    Public Sub Transform(transform As PdfMatrix)
    Parameters
    transform
    PdfMatrix

    The transform to apply to all the points in the PdfSubpathCollection.

    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.