An immutable rounded rectangle with the custom radii for all four corners.

Constructors

RRect.fromLTRBAndCorners(double left, double top, double right, double bottom, { Radius topLeft: Radius.zero, Radius topRight: Radius.zero, Radius bottomRight: Radius.zero, Radius bottomLeft: Radius.zero })
Construct a rounded rectangle from its left, top, right, and bottom edges, and topLeft, topRight, bottomRight, and bottomLeft radii. [...]
RRect.fromLTRBR(double left, double top, double right, double bottom, Radius radius)
Construct a rounded rectangle from its left, top, right, and bottom edges, and the same radius in each corner.
RRect.fromLTRBXY(double left, double top, double right, double bottom, double radiusX, double radiusY)
Construct a rounded rectangle from its left, top, right, and bottom edges, and the same radii along its horizontal axis and its vertical axis.
RRect.fromRectAndCorners(Rect rect, { Radius topLeft: Radius.zero, Radius topRight: Radius.zero, Radius bottomRight: Radius.zero, Radius bottomLeft: Radius.zero })
Construct a rounded rectangle from its bounding box and and topLeft, topRight, bottomRight, and bottomLeft radii. [...]
RRect.fromRectAndRadius(Rect rect, Radius radius)
Construct a rounded rectangle from its bounding box and a radius that is the same in each corner.
RRect.fromRectXY(Rect rect, double radiusX, double radiusY)
Construct a rounded rectangle from its bounding box and the same radii along its horizontal axis and its vertical axis.

Properties

blRadius Radius
The bottom-left Radius.
read-only
blRadiusX double
The bottom-left horizontal radius.
read-only
blRadiusY double
The bottom-left vertical radius.
read-only
bottom double
The offset of the bottom edge of this rectangle from the y axis.
read-only
brRadius Radius
The bottom-right Radius.
read-only
brRadiusX double
The bottom-right horizontal radius.
read-only
brRadiusY double
The bottom-right vertical radius.
read-only
center Offset
The offset to the point halfway between the left and right and the top and bottom edges of this rectangle.
read-only
hashCode int
The hash code for this object. [...]
read-only
height double
The distance between the top and bottom edges of this rectangle.
read-only
isCircle bool
Whether this rounded rectangle would draw as a circle.
read-only
isEllipse bool
Whether this rounded rectangle has no side with a straight section.
read-only
isEmpty bool
Whether this rounded rectangle encloses a non-zero area. Negative areas are considered empty.
read-only
isFinite bool
Whether all coordinates of this rounded rectangle are finite.
read-only
isRect bool
Whether this rounded rectangle is a simple rectangle with zero corner radii.
read-only
isStadium bool
Whether this rounded rectangle has a side with no straight section.
read-only
left double
The offset of the left edge of this rectangle from the x axis.
read-only
longestSide double
The greater of the magnitudes of the width and the height of this rounded rectangle.
read-only
middleRect Rect
The rectangle that would be formed using the axis-aligned intersection of the sides of the rectangle, i.e., the rectangle formed from the inner-most centers of the ellipses that form the corners. This is the intersection of the wideMiddleRect and the tallMiddleRect. If any of the intersections are void, the resulting Rect will have negative width or height.
read-only
outerRect Rect
The bounding box of this rounded rectangle (the rectangle with no rounded corners).
read-only
The offset of the right edge of this rectangle from the x axis.
read-only
safeInnerRect Rect
The non-rounded rectangle that is constrained by the smaller of the two diagonals, with each diagonal traveling through the middle of the curve corners. The middle of a corner is the intersection of the curve with its respective quadrant bisector.
read-only
shortestSide double
The lesser of the magnitudes of the width and the height of this rounded rectangle.
read-only
tallMiddleRect Rect
The biggest rectangle that is entirely inside the rounded rectangle and has the full height of the rounded rectangle. If the rounded rectangle does not have an axis-aligned intersection of its top and bottom side, the resulting Rect will have negative width or height.
read-only
tlRadius Radius
The top-left Radius.
read-only
tlRadiusX double
The top-left horizontal radius.
read-only
tlRadiusY double
The top-left vertical radius.
read-only
top double
The offset of the top edge of this rectangle from the y axis.
read-only
trRadius Radius
The top-right Radius.
read-only
trRadiusX double
The top-right horizontal radius.
read-only
trRadiusY double
The top-right vertical radius.
read-only
wideMiddleRect Rect
The biggest rectangle that is entirely inside the rounded rectangle and has the full width of the rounded rectangle. If the rounded rectangle does not have an axis-aligned intersection of its left and right side, the resulting Rect will have negative width or height.
read-only
width double
The distance between the left and right edges of this rectangle.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

contains(Offset point) bool
Whether the point specified by the given offset (which is assumed to be relative to the origin) lies inside the rounded rectangle. [...]
deflate(double delta) RRect
Returns a new RRect with edges and radii moved inwards by the given delta.
inflate(double delta) RRect
Returns a new RRect with edges and radii moved outwards by the given delta.
shift(Offset offset) RRect
Returns a new RRect translated by the given offset.
toString() String
Returns a string representation of this object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(other) bool
The equality operator. [...]

Static Properties

zero RRect
A rounded rectangle with all the values set to zero.
final

Static Methods

lerp(RRect a, RRect b, double t) RRect
Linearly interpolate between two rounded rectangles. [...]