PdfPoint Struct
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.
public readonly struct PdfPoint : IEquatable<PdfPoint>, IFormattable
Public Structure PdfPoint
Implements IEquatable(Of PdfPoint), 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.
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.
Property Value
- System.Double
The X-coordinate value of this PdfPoint structure.
Y
Gets the Y-coordinate value of this PdfPoint structure.
Property Value
- System.Double
The Y-coordinate value of this PdfPoint structure.
Methods
Equals(PdfPoint)
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
Equals(Object)
Determines whether the specified System.Object is equal to this PdfPoint instance.
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
Overrides
GetHashCode()
Returns a hash code for this PdfPoint instance.
Returns
- System.Int32
An integer value that specifies a hash value for this PdfPoint instance.
Overrides
ToString()
Returns a System.String that represents this PdfPoint instance.
Returns
- System.String
A System.String that represents this PdfPoint instance.
Overrides
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.
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.
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.
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.