Graphics Module¶
You are welcome to look over the code in graphics.py
, but do not worry about the details of the implementation. More information about the library can be found
here. In your code, you will (minimally) make use of the following methods from this module:
Graphics Function or Method |
Behavior |
---|---|
|
Constructs a new graphics window (or GraphWin) for drawing on the screen. The parameters are optional; the default title is “Graphics Window,” and the default size is 200 x 200 pixels. |
|
Pauses (or blocks) and waits for the user to click their mouse in the window and returns where the mouse was clicked as a |
|
Constructs a Point having the given coordinates. |
|
Returns the x and y coordinate of a Point, respectively. |
|
Constructs a Rectangle having opposite corners at point1 (top left) and point2 (bototm right). |
|
Constructs a Text object that displays |
|
Sets the text of the Text object to string. |
|
Gets the text of the Text object (as a string). |
|
Sets the color of the Text to |
|
Gets the color of the Text (as a string). Note: |
Feel free to check out the documentation for other methods that you may find helpful as you customize your implementation.