Struct PdfRectangle
- Namespace
- MiPdf
- Assembly
- MiPdf.dll
An axis-aligned rectangle in PDF user space (points, origin bottom-left).
public readonly record struct PdfRectangle : IEquatable<PdfRectangle>
- Implements
- Inherited Members
Constructors
PdfRectangle(double, double, double, double)
An axis-aligned rectangle in PDF user space (points, origin bottom-left).
public PdfRectangle(double Left, double Bottom, double Right, double Top)
Parameters
Properties
Bottom
public double Bottom { get; init; }
Property Value
Height
public double Height { get; }
Property Value
Left
public double Left { get; init; }
Property Value
Right
public double Right { get; init; }
Property Value
Top
public double Top { get; init; }
Property Value
Width
public double Width { get; }
Property Value
Methods
Contains(double, double)
Returns true if the point lies inside the rectangle or on its border.
public bool Contains(double x, double y)
Parameters
Returns
FromCorners(double, double, double, double)
Creates a normalized rectangle from two opposite corners given in any order.
public static PdfRectangle FromCorners(double x1, double y1, double x2, double y2)
Parameters
Returns
FromSize(double, double, double, double)
Creates a rectangle from its lower-left corner (x, y) and its size.
Negative sizes are normalized.
public static PdfRectangle FromSize(double x, double y, double width, double height)
Parameters
Returns
Inflate(double)
Returns a rectangle enlarged by d points on every side (shrunk if negative).
public PdfRectangle Inflate(double d)
Parameters
ddouble