fills a rounded rectangle on a Bangle.js 2
This module adds a method fillroundrect
for drawing filled rounded rectangles to the global graphics context g
. The current implementation is based on a remark from forum user RaoulDuke (see this discussion).
The new method has the signature
g.fillroundrect(x1,y1, x2,y2, radius);
with the following parameters:
x1
- the left x coordinatey1
- the top y coordinatex2
- the right x coordinatey2
- the bottom y coordinateradius
- the corner radius (limited to 50% of the shorter edge of the rectangle
The rounded rectangle is drawn and filled with current foreground color.