rectangle method
Draws a rectangle with the top-left corner at (x, y) with the specified width and height.
Implementation
Drawable rectangle(double x, double y, double width, double height) {
final List<PointD> points = [
PointD(x, y),
PointD(x + width, y),
PointD(x + width, y + height),
PointD(x, y + height)
];
final OpSet outline = OpSetBuilder.buildPolygon(points, drawConfig);
return _buildDrawable(outline, points);
}