Opait PDF Library
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Opait.Pdf.Api.PdfPoint Class Reference

Represents an ordered pair of x and y coordinates that defines a point in a PDF two-dimensional plane. More...

Inheritance diagram for Opait.Pdf.Api.PdfPoint:

Public Member Functions

 PdfPoint ()
 Default constructor.
 
 PdfPoint (double x, double y)
 Initializes a new instance of the PdfPoint class with the specified coordinates. More...
 
 PdfPoint (PdfPoint other)
 Initializes a new instance of the PdfPoint class using another point. More...
 
 PdfPoint (PdfPoint center, double radius, double alpha)
 Initializes a new instance of the PdfPoint class using a point on a circle. More...
 
 PdfPoint (double centerX, double centerY, double radius, double alpha)
 Initializes a new instance of the PdfPoint class using a point on a circle. More...
 
PdfPoint Add (double x1, double y1)
 Adds the specified values to the point's coordinates. More...
 
PdfPoint Add (PdfPoint pt)
 Adds the specified point to this point's coordinates. More...
 
PdfPoint Add (PdfSize pdfSize)
 Adds the specified size to this point's coordinates. More...
 
PdfPoint Subtract (double x1, double y1)
 Subtracts the specified values from the point's coordinates. More...
 
PdfPoint Subtract (PdfPoint pt)
 Subtracts the specified point from this point's coordinates. More...
 
PdfPoint Subtract (PdfSize pdfSize)
 Subtracts the specified size from this point's coordinates. More...
 
override bool Equals (object obj)
 Equals - compares this Point with the passed in object.
More...
 
bool Equals (PdfPoint value)
 Equals - compares this PdfPoint with the passed in object.
More...
 
override int GetHashCode ()
 Returns the hash code for this PdfPoint. More...
 
override string ToString ()
 Converts this PdfPoint to a human-readable string. More...
 

Static Public Member Functions

static bool operator== (PdfPoint point1, PdfPoint point2)
 Checks two PdfPoint instances for equality. More...
 
static bool operator!= (PdfPoint point1, PdfPoint point2)
 Checks two PdfPoint instances for inequality. More...
 
static PdfPoint operator- (PdfPoint pt)
 Applies the unary negative sign to a PdfPoint. More...
 
static PdfPoint operator+ (PdfPoint pt1, PdfPoint pt2)
 Adds two instances of the PdfPoint class. More...
 
static PdfPoint operator+ (PdfPoint pt, PdfSize size)
 Moves a PdfPoint by PdfSize. More...
 
static PdfPoint operator- (PdfPoint pt1, PdfPoint pt2)
 Subtracts two instances of the PdfPoint class. More...
 
static PdfPoint operator- (PdfPoint pt, PdfSize size)
 Subtract PdfSize from PdfPoint. More...
 

Public Attributes

double X
 Gets the x-coordinate of this Point.
 
double Y
 Gets the y-coordinate of this Point.
 

Static Public Attributes

static readonly PdfPoint Empty = new PdfPoint()
 Represents a PdfPoint that has X and Y values set to zero.
 

Properties

bool IsEmpty [get]
 Gets a value indicating whether this PdfPoint is empty.
 

Detailed Description

Represents an ordered pair of x and y coordinates that defines a point in a PDF two-dimensional plane.

Constructor & Destructor Documentation

◆ PdfPoint() [1/4]

Opait.Pdf.Api.PdfPoint.PdfPoint ( double  x,
double  y 
)

Initializes a new instance of the PdfPoint class with the specified coordinates.

Parameters
xThe horizontal coordinate of the point.
yThe vertical coordinate of the point.

◆ PdfPoint() [2/4]

Opait.Pdf.Api.PdfPoint.PdfPoint ( PdfPoint  other)

Initializes a new instance of the PdfPoint class using another point.

Parameters
otherClones this point.

◆ PdfPoint() [3/4]

Opait.Pdf.Api.PdfPoint.PdfPoint ( PdfPoint  center,
double  radius,
double  alpha 
)

Initializes a new instance of the PdfPoint class using a point on a circle.

Parameters
centerThe center of the circle.
radiusThe radius of the circle.
alphaThe angle between the vertical axis and a line drawn from the origin to the point.

◆ PdfPoint() [4/4]

Opait.Pdf.Api.PdfPoint.PdfPoint ( double  centerX,
double  centerY,
double  radius,
double  alpha 
)

Initializes a new instance of the PdfPoint class using a point on a circle.

Parameters
centerXThe x-coordinate of the center of the circle.
centerYThe y-coordinate of the center of the circle.
radiusThe radius of the circle.
alphaThe angle between the vertical axis and a line drawn from the origin to the point.

Member Function Documentation

◆ Add() [1/3]

PdfPoint Opait.Pdf.Api.PdfPoint.Add ( double  x1,
double  y1 
)

Adds the specified values to the point's coordinates.

Parameters
x1Displacement in the x-direction.
y1Displacement in the y-direction.
Returns
A point at the displaced location.

◆ Add() [2/3]

PdfPoint Opait.Pdf.Api.PdfPoint.Add ( PdfPoint  pt)

Adds the specified point to this point's coordinates.

Parameters
ptThe point to add.
Returns
A point at the resulting coordinates.

◆ Add() [3/3]

PdfPoint Opait.Pdf.Api.PdfPoint.Add ( PdfSize  pdfSize)

Adds the specified size to this point's coordinates.

Parameters
pdfSizeThe size to add.
Returns
A point at the resulting coordinates.

◆ Equals() [1/2]

override bool Opait.Pdf.Api.PdfPoint.Equals ( object  obj)

Equals - compares this Point with the passed in object.

Parameters
objThe object to compare to "this"
Returns
'true' if the object is an instance of PdfPoint and if it's equal to "this".

◆ Equals() [2/2]

bool Opait.Pdf.Api.PdfPoint.Equals ( PdfPoint  value)

Equals - compares this PdfPoint with the passed in object.

Parameters
valueThe PdfPoint to compare to "this"
Returns
'true' if "value" is equal to "this".

◆ GetHashCode()

override int Opait.Pdf.Api.PdfPoint.GetHashCode ( )

Returns the hash code for this PdfPoint.

Returns
The hash code for this PdfPoint.

◆ operator!=()

static bool Opait.Pdf.Api.PdfPoint.operator!= ( PdfPoint  point1,
PdfPoint  point2 
)
static

Checks two PdfPoint instances for inequality.

Parameters
point1The first point.
point2The second point.
Returns
'true' if the two points are not equal; otherwise, 'false'.

◆ operator+() [1/2]

static PdfPoint Opait.Pdf.Api.PdfPoint.operator+ ( PdfPoint  pt,
PdfSize  size 
)
static

Moves a PdfPoint by PdfSize.

Parameters
ptThe point to move.
sizeThe size of the displacement.
Returns
The moved point.

◆ operator+() [2/2]

static PdfPoint Opait.Pdf.Api.PdfPoint.operator+ ( PdfPoint  pt1,
PdfPoint  pt2 
)
static

Adds two instances of the PdfPoint class.

Parameters
pt1The first point.
pt2The second point.
Returns
The addition of the two points.

◆ operator-() [1/3]

static PdfPoint Opait.Pdf.Api.PdfPoint.operator- ( PdfPoint  pt)
static

Applies the unary negative sign to a PdfPoint.

Parameters
ptThe point to negate.
Returns
The negated point.

◆ operator-() [2/3]

static PdfPoint Opait.Pdf.Api.PdfPoint.operator- ( PdfPoint  pt,
PdfSize  size 
)
static

Subtract PdfSize from PdfPoint.

Parameters
ptThe stating point.
sizeThe size of the subtraction.
Returns
The point after the subtraction.

◆ operator-() [3/3]

static PdfPoint Opait.Pdf.Api.PdfPoint.operator- ( PdfPoint  pt1,
PdfPoint  pt2 
)
static

Subtracts two instances of the PdfPoint class.

Parameters
pt1The first point.
pt2The second point.
Returns
The subtraction of the two points.


◆ operator==()

static bool Opait.Pdf.Api.PdfPoint.operator== ( PdfPoint  point1,
PdfPoint  point2 
)
static

Checks two PdfPoint instances for equality.

Parameters
point1The first point.
point2The second point.
Returns
'true' if the two points are equal; otherwise, 'false'.

◆ Subtract() [1/3]

PdfPoint Opait.Pdf.Api.PdfPoint.Subtract ( double  x1,
double  y1 
)

Subtracts the specified values from the point's coordinates.

Parameters
x1Displacement in the x-direction.
y1Displacement in the y-direction.
Returns
A point at the displaced location.

◆ Subtract() [2/3]

PdfPoint Opait.Pdf.Api.PdfPoint.Subtract ( PdfPoint  pt)

Subtracts the specified point from this point's coordinates.

Parameters
ptThe point to subtract.
Returns
A point at the resulting coordinates.

◆ Subtract() [3/3]

PdfPoint Opait.Pdf.Api.PdfPoint.Subtract ( PdfSize  pdfSize)

Subtracts the specified size from this point's coordinates.

Parameters
pdfSizeThe size to subtract.
Returns
A point at the resulting coordinates.

◆ ToString()

override string Opait.Pdf.Api.PdfPoint.ToString ( )

Converts this PdfPoint to a human-readable string.

Returns
A string that shows the X-coordinate, followed by the Y-coordinate of the point.