Table of Contents

Struct PdfPoint

Namespace
UglyToad.PdfPig.Core
Assembly
UglyToad.PdfPig.Core.dll

A point in a PDF file.

public struct PdfPoint
Inherited Members

Remarks

PDF coordinates are defined with the origin at the lower left (0, 0). The Y-axis extends vertically upwards and the X-axis horizontally to the right. Unless otherwise specified on a per-page basis, units in PDF space are equivalent to a typographic point (1/72 inch).

Constructors

PdfPoint(decimal, decimal)

Create a new PdfPoint at this position.

public PdfPoint(decimal x, decimal y)

Parameters

x decimal
y decimal

PdfPoint(double, double)

Create a new PdfPoint at this position.

public PdfPoint(double x, double y)

Parameters

x double
y double

PdfPoint(int, int)

Create a new PdfPoint at this position.

public PdfPoint(int x, int y)

Parameters

x int
y int

Properties

Origin

The origin of the coordinates system.

public static PdfPoint Origin { get; }

Property Value

PdfPoint

X

The X coordinate for this point. (Horizontal axis).

public readonly double X { get; }

Property Value

double

Y

The Y coordinate of this point. (Vertical axis).

public readonly double Y { get; }

Property Value

double

Methods

Equals(object)

Returns a value indicating whether this PdfPoint is equal to a specified PdfPoint .

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns the hash code for this PdfPoint.

public override int GetHashCode()

Returns

int

MoveX(double)

Creates a new PdfPoint which is the current point moved in the x direction relative to its current position by a value.

public PdfPoint MoveX(double dx)

Parameters

dx double

The distance to move the point in the x direction relative to its current location.

Returns

PdfPoint

A new point shifted on the x axis by the given delta value.

MoveY(double)

Creates a new PdfPoint which is the current point moved in the y direction relative to its current position by a value.

public PdfPoint MoveY(double dy)

Parameters

dy double

The distance to move the point in the y direction relative to its current location.

Returns

PdfPoint

A new point shifted on the y axis by the given delta value.

ToString()

public override string ToString()

Returns

string

Translate(double, double)

Creates a new PdfPoint which is the current point moved in the x and y directions relative to its current position by a value.

public PdfPoint Translate(double dx, double dy)

Parameters

dx double

The distance to move the point in the x direction relative to its current location.

dy double

The distance to move the point in the y direction relative to its current location.

Returns

PdfPoint

A new point shifted on the y axis by the given delta value.