#include <Rectangle.h>
Public Member Functions | |
| void | make_square () |
| void | draw () |
| void | highlight () |
Public Member Functions inherited from Shape | |
| Shape () | |
| color | get_color () |
| color | get_highlight_color () |
| point2d | get_position () |
| int | get_width () |
| int | get_height () |
| float | get_x () |
| float | get_y () |
| void | set_color (color) |
| void | set_highlight_color (color) |
| void | set_position (point2d) |
| void | set_width (int) |
| void | set_height (int) |
| void | set_x (float) |
| void | set_y (float) |
| bool | is_at (point2d) |
Additional Inherited Members | |
Protected Member Functions inherited from Shape | |
| void | calculate_highlight_color () |
Protected Attributes inherited from Shape | |
| color | _color |
| color | _highlight_color |
| point2d | _position |
| int | _width |
| int | _height |
Rectangle class holds all logic to creating and drawing rectangles, and inherits basic attributes and methods from the Shape class
|
virtual |
|
virtual |
This method draws a larger rectangle to the screen using the Shape's _highlight_color property
Implements Shape.
| void Rectangle::make_square | ( | ) |
This makes the rectangle a square based on it's largest side
1.8.1.2