Skip to content

PDFStandardRectangle

Namespace: O2S.Components.PDF4NET.Graphics

Defines a rectangle in PDF coordinate system.

public class PDFStandardRectangle

Inheritance ObjectPDFStandardRectangle

Constructors

PDFStandardRectangle()

Initializes a new PDFStandardRectangle object.

public PDFStandardRectangle()

PDFStandardRectangle(Double, Double, Double, Double)

Initializes a new PDFStandardRectangle object.

public PDFStandardRectangle(double llx, double lly, double urx, double ury)

Parameters

llx Double
The lower-left x coordinate of the rectangle.

lly Double
The lower-left y coordinate of the rectangle.

urx Double
The upper-right x coordinate of the rectangle.

ury Double
The upper-right y coordinate of the rectangle.


PDFStandardRectangle(PDFPoint, PDFPoint)

Initializes a new PDFStandardRectangle object.

public PDFStandardRectangle(PDFPoint ll, PDFPoint ur)

Parameters

ll PDFPoint
The position of lower-left corner of the rectangle.

ur PDFPoint
The position of upper-right corner of the rectangle.


PDFStandardRectangle(PDFStandardRectangle)

Initializes a new PDFStandardRectangle object.

public PDFStandardRectangle(PDFStandardRectangle rectangle)

Parameters

rectangle PDFStandardRectangle
Source rectangle


Properties

Height

Gets or sets the rectangle height.

public double Height { get; internal set; }

Property Value

Double
The height of the rectangle.


LL

Gets the position of lower-left corner.

public PDFPoint LL { get; set; }

Property Value

PDFPoint
The position of lower-left corner of the rectangle.


LLX

Gets the lower-left x coordinate.

public double LLX { get; internal set; }

Property Value

Double
The lower-left x coordinate of the rectangle.


LLY

Gets the lower-left y coordinate.

public double LLY { get; internal set; }

Property Value

Double
The lower-left y coordinate of the rectangle.


UR

Gets the position of upper-right corner.

public PDFPoint UR { get; set; }

Property Value

PDFPoint
The position of upper-right corner of the rectangle.


URX

Gets the upper-right x coordinate.

public double URX { get; internal set; }

Property Value

Double
The upper-right x coordinate of the rectangle.


URY

Gets the upper-right y coordinate.

public double URY { get; internal set; }

Property Value

Double
The upper-right y coordinate of the rectangle.


Width

Gets or sets the rectangle width.

public double Width { get; internal set; }

Property Value

Double
The width of the rectangle.


Methods

Intersect(PDFStandardRectangle, PDFStandardRectangle)

Computes the intersection of 2 rectangles.

public static PDFStandardRectangle Intersect(PDFStandardRectangle r1, PDFStandardRectangle r2)

Parameters

r1 PDFStandardRectangle
First rectangle

r2 PDFStandardRectangle
Second rectangle

Returns

PDFStandardRectangle
The intersection rectangle.


IsPointInRectangle(PDFPoint)

Tests if the given point is located inside the rectangle.

public bool IsPointInRectangle(PDFPoint point)

Parameters

point PDFPoint
The point.

Returns

Boolean
True if the point is located inside the rectangle, false otherwise.


IsPointInRectangle(Double, Double)

Tests if the given point is located inside the rectangle.

public bool IsPointInRectangle(double x, double y)

Parameters

x Double
The x coordinate.

y Double
The y coordinate.

Returns

Boolean
True if the point is located inside the rectangle, false otherwise.


ToString()

Returns a String that represents the current Object.

public string ToString()

Returns

String
String that represents the current Object.