#include <DrawingController.h>
Detailed Description
The DrawingController contains most of the logic controlling the application, it needs to know what Drawing object it is controlling
Constructor & Destructor Documentation
DrawingController::DrawingController |
( |
Drawing * |
drawing = NULL | ) |
|
Member Function Documentation
void DrawingController::add_new_shape |
( |
point2d |
point | ) |
|
|
private |
Adds a new shape centered at a point
- Parameters
-
point | the point to add the shape |
void DrawingController::change_bg_color |
( |
| ) |
|
|
private |
Changes the hue of the colour of the background colour
void DrawingController::change_color |
( |
| ) |
|
|
private |
Changes the hue of the colour of the selected shape
void DrawingController::draw |
( |
| ) |
|
Draws all items on the screen needed for the program
Drawing * DrawingController::get_controlling |
( |
| ) |
|
Gets the Drawing object the controller is controlling
- Returns
- the Drawing object the controller is controlling
void DrawingController::handle_input |
( |
| ) |
|
Handles input and changes state of the program and the Drawing / Shapes it controls
void DrawingController::move_shape |
( |
point2d |
relative_movement | ) |
|
|
private |
Moves the selected shape by a relative amount
- Parameters
-
relative_movement | the relative amount to move the shape |
void DrawingController::resize_shape |
( |
int |
rel_width, |
|
|
int |
rel_height |
|
) |
| |
|
private |
Resizes the selected shape by a relative amount
- Parameters
-
rel_width | the relative change in width |
rel_height | the relative change in height |
color DrawingController::rotate_hue |
( |
color |
c | ) |
|
|
private |
Changes the colour by rotating the hue of the colour
- Parameters
-
- Returns
- the hue-altered colour
void DrawingController::set_controlling |
( |
Drawing * |
drawing | ) |
|
Sets the Drawing object the controller is controlling
- Parameters
-
drawing | the Drawing object to control |
Member Data Documentation
drawing_element DrawingController::_adding |
|
private |
controls which shape subclass will be drawn to the screen
Drawing* DrawingController::_controlling |
|
private |
The Drawing object the controller is controlling
The documentation for this class was generated from the following files: