Package bagel
Class Drawing
java.lang.Object
bagel.Drawing
Contains utility methods for drawing various shapes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawCircle(double x, double y, double radius, Colour colour) Draw a circle of the given radius and colour, centred at the point (x, y).static voiddrawCircle(Point centre, double radius, Colour colour) Draw a circle of the given radius and colour, centred at the provided point.static voidDraw a line of the given thickness and colour from point a to point b.static voiddrawRectangle(double x, double y, double width, double height, Colour colour) Draw a rectangle with its top-left at (x, y) with the provided width, height, and colour.static voiddrawRectangle(Point topLeft, double width, double height, Colour colour) Draw a rectangle using a Point to specify the top-left.
-
Constructor Details
-
Drawing
public Drawing()
-
-
Method Details
-
drawRectangle
Draw a rectangle with its top-left at (x, y) with the provided width, height, and colour. -
drawRectangle
Draw a rectangle using a Point to specify the top-left. -
drawLine
Draw a line of the given thickness and colour from point a to point b. -
drawCircle
Draw a circle of the given radius and colour, centred at the provided point. (Warning: this is not very efficient.) -
drawCircle
Draw a circle of the given radius and colour, centred at the point (x, y). (Warning: this is not very efficient.)
-