/** * Draw a filled square of side length 2r, centred on (x, y). * * @param x the x-coordinate of the centre of the square * @param y the y-coordinate of the centre of the square * @param r radius is half the length of any side of the square * @throws RuntimeException if r is negative */ public static void filledSquare(double x, double y, double r) { offscreen.fill(ShapeAssist.square(x, y, r)); draw(); }