drawRoundRectComplex method
Draws a rounded rectangle with different corner radii.
The rectangle starts at position (x
, y
) and has the given width
and
height
. The corner radii can be specified for each corner using the
respective parameters.
Returns the current Graphics instance, allowing for method chaining.
See also:
- RRect, the underlying class used to draw the rounded rectangle.
Implementation
Graphics drawRoundRectComplex(
double x,
double y,
double width,
double height, [
double topLeftRadius = 0,
double topRightRadius = 0,
double bottomLeftRadius = 0,
double bottomRightRadius = 0,
]) {
_path!.addRRect(
RRect.fromLTRBAndCorners(
x,
y,
x + width,
y + height,
topLeft: Radius.circular(topLeftRadius),
topRight: Radius.circular(topRightRadius),
bottomLeft: Radius.circular(bottomLeftRadius),
bottomRight: Radius.circular(bottomRightRadius),
),
);
return this;
}