/** * Draw a filled rectangle of given half width and half height, centred on (x, y) and rotated by d * degrees. * * @param x the x-coordinate of the centre of the rectangle * @param y the y-coordinate of the centre of the rectangle * @param halfWidth is half the width of the rectangle * @param halfHeight is half the height of the rectangle * @param degrees is the rotation of the rectangle with 3 o'clock being 0 degrees and 12 o'clock * being 270 degrees * @throws RuntimeException if halfWidth or halfHeight is negative */ public static void filledAngledRectangle( double x, double y, double halfWidth, double halfHeight, double degrees) { offscreen.fill(ShapeAssist.angledRectangle(x, y, halfWidth, halfHeight, degrees)); draw(); }