MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / roundedRect

Method roundedRect

src/main/java/field/graphics/FLine.java:495–498  ·  view source on GitHub ↗

draws a rounded rectangle with corner `x, y` and width `w` and heght `h` and corner radius `r`

(double x, double y, double w, double h, double r)

Source from the content-addressed store, hash-verified

493 /**
494 * draws a circle at `x, y` with radius `r`.
495 */
496 public FLine circle(double x, double y, double r) {
497 double k = 0.5522847498f * r;
498 this.moveTo(x, y - r);
499 this.cubicTo(x + k, y - r, x + r, y - k, x + r, y);
500 this.cubicTo(x + r, y + k, x + k, y + r, x, y + r);
501 this.cubicTo(x - k, y + r, x - r, y + k, x - r, y);

Callers 4

showMethod · 0.95
makeCloseBoxMethod · 0.80
makeMenuBoxMethod · 0.80
makeButtonMethod · 0.80

Calls 1

drawRoundedRectIntoMethod · 0.95

Tested by

no test coverage detected