PdfRect class
Rectangle in PDF page coordinates.
Please note that PDF page coordinates is different from Flutter's coordinate. PDF page coordinates's origin is at the bottom-left corner and Y-axis is pointing upward; bottom is generally smaller than top. The unit is normally in points (1/72 inch).
- Available extensions
Constructors
- PdfRect.new(double left, double top, double right, double bottom)
-
const
Properties
- bottom → double
-
Bottom coordinate (smaller than top).
final
- bottomLeft → PdfPoint
-
Bottom-left point of the rectangle.
no setter
- bottomRight → PdfPoint
-
Bottom-right point of the rectangle.
no setter
- center → PdfPoint
-
Center point of the rectangle.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- height → double
-
Height of the rectangle.
no setter
- isEmpty → bool
-
Determine whether the rectangle is empty.
no setter
- isNotEmpty → bool
-
Determine whether the rectangle is NOT empty.
no setter
- left → double
-
Left coordinate.
final
- right → double
-
Right coordinate.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- top → double
-
Top coordinate (bigger than bottom).
final
- topLeft → PdfPoint
-
Top-left point of the rectangle.
no setter
- topRight → PdfPoint
-
Top-right point of the rectangle.
no setter
- width → double
-
Width of the rectangle.
no setter
Methods
-
containsPoint(
PdfPoint offset, {double margin = 0}) → bool - Determine whether the rectangle contains the specified point (in the PDF page coordinates).
-
containsXy(
double x, double y, {double margin = 0}) → bool - Determine whether the rectangle contains the specified point (in the PDF page coordinates).
-
distanceSquaredTo(
PdfPoint point) → double -
inflate(
double dx, double dy) → PdfRect - Inflate (or deflate) the rectangle.
-
merge(
PdfRect other) → PdfRect - Merge two rectangles.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
overlaps(
PdfRect other) → bool - Determine whether the rectangle overlaps the specified rectangle (in the PDF page coordinates).
-
rotate(
int rotation, PdfPage page) → PdfRect - Rotate the rectangle.
-
rotateReverse(
int rotation, PdfPage page) → PdfRect - Rotate the rectangle in reverse direction.
-
toRect(
{required PdfPage page, Size? scaledPageSize, int? rotation}) → Rect -
Available on PdfRect, provided by the PdfRectExt extension
Convert to Rect in Flutter coordinate.page
is the page to convert the rectangle.scaledPageSize
is the scaled page size to scale the rectangle. If not specified, PdfPage.size is used.rotation
is the rotation of the page. If not specified, PdfPage.rotation is used. -
toRectInDocument(
{required PdfPage page, required Rect pageRect}) → Rect -
Available on PdfRect, provided by the PdfRectExt extension
Convert to Rect in Flutter coordinate usingpageRect
as the page's bounding rectangle. -
toString(
) → String -
A string representation of this object.
override
-
translate(
double dx, double dy) → PdfRect - Translate the rectangle.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override