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

    Show / Hide Table of Contents

    PdfLineSegment Struct

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

    Represents a segment of a PdfSubpath.

    • C#
    • VB.NET
    public struct PdfLineSegment : IEquatable<PdfLineSegment>
    Public Structure PdfLineSegment
        Implements IEquatable(Of PdfLineSegment)
    Implements
    System.IEquatable<PdfLineSegment>

    Constructors

    PdfLineSegment(PdfPoint)

    Initializes a new instance of the straight line segment.

    • C#
    • VB.NET
    public PdfLineSegment(PdfPoint endPoint)
    Public Sub New(endPoint As PdfPoint)
    Parameters
    endPoint
    PdfPoint

    The end point of the straight line segment.

    PdfLineSegment(PdfPoint, PdfPoint, PdfPoint)

    Initializes a new instance of the curved line segment (cubic Bézier curve).

    • C#
    • VB.NET
    public PdfLineSegment(PdfPoint controlPoint1, PdfPoint controlPoint2, PdfPoint endPoint)
    Public Sub New(controlPoint1 As PdfPoint, controlPoint2 As PdfPoint, endPoint As PdfPoint)
    Parameters
    controlPoint1
    PdfPoint

    The first control point of the curved line segment.

    controlPoint2
    PdfPoint

    The second control point of the curved line segment.

    endPoint
    PdfPoint

    The end point of the curved line segment.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2.2 Cubic Bézier Curves'

    Properties

    ControlPoint1

    Gets the first control point of the curved line segment (cubic Bézier curve).

    • C#
    • VB.NET
    public readonly PdfPoint ControlPoint1 { get; }
    Public ReadOnly Property ControlPoint1 As PdfPoint
    Property Value
    PdfPoint

    The first control point of the curved line segment.

    ControlPoint2

    Gets the second control point of the curved line segment (cubic Bézier curve).

    • C#
    • VB.NET
    public readonly PdfPoint ControlPoint2 { get; }
    Public ReadOnly Property ControlPoint2 As PdfPoint
    Property Value
    PdfPoint

    The second control point of the curved line segment.

    EndPoint

    Gets the end point of the line segment.

    • C#
    • VB.NET
    public readonly PdfPoint EndPoint { get; }
    Public ReadOnly Property EndPoint As PdfPoint
    Property Value
    PdfPoint

    The end point of the line segment.

    IsCurve

    Gets a value indicating whether this PdfLineSegment is a curved line segment (cubic Bézier curve).

    • C#
    • VB.NET
    public readonly bool IsCurve { get; }
    Public ReadOnly Property IsCurve As Boolean
    Property Value
    System.Boolean

    true if this PdfLineSegment is a curved line segment; otherwise, false.

    See Also
    PDF Specification ISO 32000-1:2008, section '8.5.2.2 Cubic Bézier Curves'

    IsStraight

    Gets a value indicating whether this PdfLineSegment is a straight line segment.

    • C#
    • VB.NET
    public readonly bool IsStraight { get; }
    Public ReadOnly Property IsStraight As Boolean
    Property Value
    System.Boolean

    true if this PdfLineSegment is a straight line segment; otherwise, false.

    Methods

    Equals(PdfLineSegment)

    Determines whether the other PdfLineSegment is equal to this PdfLineSegment instance.

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

    The other line segment to compare with this line segment instance.

    Returns
    System.Boolean

    true if the other PdfLineSegment is equal to this PdfLineSegment instance; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this PdfLineSegment instance.

    • C#
    • VB.NET
    public override bool Equals(object obj)
    Public Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this line segment instance.

    Returns
    System.Boolean

    true if the specified System.Object is a PdfLineSegment and is equal to this PdfLineSegment instance; otherwise, false.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this PdfLineSegment instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this PdfLineSegment instance.

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this PdfLineSegment instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfLineSegment instance.

    Overrides
    System.ValueType.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Operators

    Equality(PdfLineSegment, PdfLineSegment)

    Determines whether first and second PdfLineSegments are equal.

    • C#
    • VB.NET
    public static bool operator ==(PdfLineSegment first, PdfLineSegment second)
    Public Shared Operator =(first As PdfLineSegment, second As PdfLineSegment) As Boolean
    Parameters
    first
    PdfLineSegment

    The first line segment.

    second
    PdfLineSegment

    The second line segment.

    Returns
    System.Boolean

    true if first and second line segments are equal; otherwise, false.

    Inequality(PdfLineSegment, PdfLineSegment)

    Determines whether first and second PdfLineSegments are not equal.

    • C#
    • VB.NET
    public static bool operator !=(PdfLineSegment first, PdfLineSegment second)
    Public Shared Operator <>(first As PdfLineSegment, second As PdfLineSegment) As Boolean
    Parameters
    first
    PdfLineSegment

    The first line segment.

    second
    PdfLineSegment

    The second line segment.

    Returns
    System.Boolean

    true if first and second line segments are not equal; otherwise, false.

    Implements

    System.IEquatable<T>

    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.