Skip to content

PDFDisplayRectangle

Namespace: O2S.Components.PDF4NET.Graphics

Defines a rectangle relative to top left corner of the page.

public class PDFDisplayRectangle

Inheritance ObjectPDFDisplayRectangle

Constructors

PDFDisplayRectangle()

Initializes a new PDFDisplayRectangle object.

public PDFDisplayRectangle()

PDFDisplayRectangle(Double, Double, Double, Double)

Initializes a new PDFDisplayRectangle object.

public PDFDisplayRectangle(double left, double top, double width, double height)

Parameters

left Double
The x coordinate of the rectangle's top left corner.

top Double
The y coordinate of the rectangle's top left corner.

width Double
The rectangle width.

height Double
The rectangle height.


PDFDisplayRectangle(PDFDisplayRectangle)

Initializes a new PDFDisplayRectangle object.

public PDFDisplayRectangle(PDFDisplayRectangle source)

Parameters

source PDFDisplayRectangle
Source visual rectangle;


Properties

Height

Gets or sets the height.

public double Height { get; set; }

Property Value

Double
The rectangle height.


Left

Gets or sets left position.

public double Left { get; set; }

Property Value

Double
The x coordinate of rectangle's top left corner.


Top

Gets or sets top position.

public double Top { get; set; }

Property Value

Double
The y coordinate of rectangle's top left corner.


Width

Gets or sets the width.

public double Width { get; set; }

Property Value

Double
The rectangle width.


Methods

Equals(Object)

Checks if this rectangle is equal to another rectangle.

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean


GetHashCode()

public int GetHashCode()

Returns

Int32


IntersectsWith(PDFDisplayRectangle)

Determines if this rectangle intersects with visualRectangle.

public bool IntersectsWith(PDFDisplayRectangle visualRectangle)

Parameters

visualRectangle PDFDisplayRectangle
The rectangle to test.

Returns

Boolean
This method returns true if there is any intersection.


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.


Union(PDFDisplayRectangle)

Performs a union operation between this object and the given rectangle.

public void Union(PDFDisplayRectangle rect)

Parameters

rect PDFDisplayRectangle
The rectangle to union.