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

    Show / Hide Table of Contents

    PdfPoint Struct

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

    Represents an x- and y-coordinate pair in two-dimensional PDF space. The positive x axis extends horizontally to the right and the positive y axis vertically upward, as in standard mathematical practice.

    • C#
    • VB.NET
    public readonly struct PdfPoint : IEquatable<PdfPoint>, IFormattable
    Public Structure PdfPoint
        Implements IEquatable(Of PdfPoint), IFormattable
    Implements
    System.IEquatable<PdfPoint>
    System.IFormattable
    Remarks

    The user space coordinate system shall be initialized to a default state for each page of a document. The CropBox property in the PdfPage shall specify the rectangle of user space corresponding to the visible area of the intended output medium (display window or printed page). The positive x axis extends horizontally to the right and the positive y axis vertically upward, as in standard mathematical practice (subject to alteration by the Rotate property in the PdfPage). The length of a unit along both the x and y axes is set by the UserUnit property (PDF 1.6) in the PdfPage (see Table 30). The default value of UserUnit is 1/72 inch (1 point). This coordinate system is called default user space.

    Constructors

    PdfPoint(Double, Double)

    Initializes a new instance of the PdfPoint structure that contains the specified coordinates.

    • C#
    • VB.NET
    public PdfPoint(double x, double y)
    Public Sub New(x As Double, y As Double)
    Parameters
    x
    System.Double

    The x-coordinate of the new PdfPoint structure.

    y
    System.Double

    The y-coordinate of the new PdfPoint structure.

    Exceptions
    System.ArgumentException

    x or y is either System.Double.NaN, System.Double.NegativeInfinity or System.Double.PositiveInfinity.

    Properties

    X

    Gets the X-coordinate value of this PdfPoint structure.

    • C#
    • VB.NET
    public readonly double X { get; }
    Public ReadOnly Property X As Double
    Property Value
    System.Double

    The X-coordinate value of this PdfPoint structure.

    Y

    Gets the Y-coordinate value of this PdfPoint structure.

    • C#
    • VB.NET
    public readonly double Y { get; }
    Public ReadOnly Property Y As Double
    Property Value
    System.Double

    The Y-coordinate value of this PdfPoint structure.

    Methods

    Equals(PdfPoint)

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

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

    The other point to compare with this point instance.

    Returns
    System.Boolean

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

    Equals(Object)

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

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

    The System.Object to compare with this point instance.

    Returns
    System.Boolean

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

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this PdfPoint instance.

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

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

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this PdfPoint instance.

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

    A System.String that represents this PdfPoint 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).

    ToString(String, IFormatProvider)

    Returns a System.String that represents this PdfPoint instance using the specified format and format provider.

    • C#
    • VB.NET
    public readonly string ToString(string format, IFormatProvider formatProvider)
    Public Function ToString(format As String, formatProvider As IFormatProvider) As String
    Parameters
    format
    System.String

    The format to use or null to use the default format.

    formatProvider
    System.IFormatProvider

    The provider to use to format the value or null to obtain the numeric format information from the current locale setting of the operating system.

    Returns
    System.String

    A System.String that represents this PdfPoint instance using the specified format and format provider.

    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(PdfPoint, PdfPoint)

    Determines whether first and second PdfPoints are equal.

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

    The first point.

    second
    PdfPoint

    The second point.

    Returns
    System.Boolean

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

    Inequality(PdfPoint, PdfPoint)

    Determines whether first and second PdfPoints are not equal.

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

    The first point.

    second
    PdfPoint

    The second point.

    Returns
    System.Boolean

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

    Implements

    System.IEquatable<T>
    System.IFormattable

    See Also

    PDF Specification ISO 32000-1:2008, section '8.3 Coordinate Systems'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.