Struct PdfRect
An axis-aligned rectangle in PDF user-space units (points, 1/72 inch).
Matches the PDF /MediaBox / /CropBox convention: [llx lly urx ury].
Assembly: DRIT.Pdf.dll
Syntax
public readonly struct PdfRect : IEquatable<PdfRect>
Constructors
PdfRect(double, double, double, double)
Initializes a new PdfRect with the specified coordinates.
Declaration
public PdfRect(double left, double bottom, double right, double top)
Parameters
Properties
Bottom
Gets the bottom (Y) coordinate of the rectangle.
Declaration
public double Bottom { get; }
Property Value
Height
Gets the height (Top - Bottom) in points.
Declaration
public double Height { get; }
Property Value
Left
Gets the left (X) coordinate of the rectangle.
Declaration
public double Left { get; }
Property Value
Right
Gets the right (X) coordinate of the rectangle.
Declaration
public double Right { get; }
Property Value
Top
Gets the top (Y) coordinate of the rectangle.
Declaration
public double Top { get; }
Property Value
Width
Gets the width (Right - Left) in points.
Declaration
public double Width { get; }
Property Value
Methods
Equals(PdfRect)
Indicates whether this rectangle equals another.
Declaration
public bool Equals(PdfRect other)
Parameters
| Type |
Name |
Description |
| PdfRect |
other |
|
Returns
Equals(object?)
Indicates whether this rectangle equals another object.
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Returns a hash code for this rectangle.
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Returns a string representation of the rectangle in the format [left bottom right top].
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(PdfRect, PdfRect)
Indicates whether two PdfRect instances are equal.
Declaration
public static bool operator ==(PdfRect a, PdfRect b)
Parameters
Returns
operator !=(PdfRect, PdfRect)
Indicates whether two PdfRect instances are not equal.
Declaration
public static bool operator !=(PdfRect a, PdfRect b)
Parameters
Returns
Implements