• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

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].

Implements
IEquatable<PdfRect>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: DRIT.Pdf
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
Type Name Description
double left
double bottom
double right
double top

Properties

Bottom

Gets the bottom (Y) coordinate of the rectangle.

Declaration
public double Bottom { get; }
Property Value
Type Description
double

Height

Gets the height (Top - Bottom) in points.

Declaration
public double Height { get; }
Property Value
Type Description
double

Left

Gets the left (X) coordinate of the rectangle.

Declaration
public double Left { get; }
Property Value
Type Description
double

Right

Gets the right (X) coordinate of the rectangle.

Declaration
public double Right { get; }
Property Value
Type Description
double

Top

Gets the top (Y) coordinate of the rectangle.

Declaration
public double Top { get; }
Property Value
Type Description
double

Width

Gets the width (Right - Left) in points.

Declaration
public double Width { get; }
Property Value
Type Description
double

Methods

Equals(PdfRect)

Indicates whether this rectangle equals another.

Declaration
public bool Equals(PdfRect other)
Parameters
Type Name Description
PdfRect other
Returns
Type Description
bool

Equals(object?)

Indicates whether this rectangle equals another object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)

GetHashCode()

Returns a hash code for this rectangle.

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()

ToString()

Returns a string representation of the rectangle in the format [left bottom right top].

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Operators

operator ==(PdfRect, PdfRect)

Indicates whether two PdfRect instances are equal.

Declaration
public static bool operator ==(PdfRect a, PdfRect b)
Parameters
Type Name Description
PdfRect a
PdfRect b
Returns
Type Description
bool

operator !=(PdfRect, PdfRect)

Indicates whether two PdfRect instances are not equal.

Declaration
public static bool operator !=(PdfRect a, PdfRect b)
Parameters
Type Name Description
PdfRect a
PdfRect b
Returns
Type Description
bool

Implements

IEquatable<T>
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX