Table of Contents

Struct PdfLine

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

A line in a PDF file.

public struct PdfLine
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

PdfLine(double, double, double, double)

Create a new PdfLine.

public PdfLine(double x1, double y1, double x2, double y2)

Parameters

x1 double

The x coordinate of the first point on the line.

y1 double

The y coordinate of the first point on the line.

x2 double

The x coordinate of the second point on the line.

y2 double

The y coordinate of the second point on the line.

PdfLine(PdfPoint, PdfPoint)

Create a new PdfLine.

public PdfLine(PdfPoint point1, PdfPoint point2)

Parameters

point1 PdfPoint

First point of the line.

point2 PdfPoint

Second point of the line.

Properties

Length

Length of the line.

public double Length { get; }

Property Value

double

Point1

First point of the line.

public readonly PdfPoint Point1 { get; }

Property Value

PdfPoint

Point2

Second point of the line.

public readonly PdfPoint Point2 { get; }

Property Value

PdfPoint

Methods

Equals(object)

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

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetBoundingRectangle()

The rectangle completely containing the PdfLine.

public PdfRectangle GetBoundingRectangle()

Returns

PdfRectangle

GetHashCode()

Returns the hash code for this PdfLine.

public override int GetHashCode()

Returns

int