|
My Project
|
Implementation of a triangle figure. More...
#include <triangle.h>


Public Member Functions | |
| triangle (int x, int y, int base, int a, int b) | |
| Constructor. | |
| void | set_line_color (Color color) override |
| Set line color. | |
| void | set_background_color (Color color) override |
| Set the background color of the shape. | |
| void | set_coordinates (int x, int y) override |
| Setting new coordinates for the figure. | |
| void | draw () override |
| Drawing a figure. | |
| std::tuple< int, int > | get_coordinates () override |
| Returns the coordinates of a figure. | |
| bool | set_geometry (int base, int a, int b) |
| Set triangle geometry. | |
Public Member Functions inherited from graphic_primitive | |
| graphic_primitive () | |
| Constructor. | |
| virtual | ~graphic_primitive () |
| Destructor. | |
Additional Inherited Members | |
Public Types inherited from graphic_primitive | |
| enum class | Color { RED , GREEN , BLUE } |
| Acceptable colors. More... | |
| enum class | Type { CICLE , RECTANGLE , SQUARE , TRIANGLE } |
| Acceptable shape types. More... | |
Implementation of a triangle figure.
| triangle::triangle | ( | int | x, |
| int | y, | ||
| int | base, | ||
| int | a, | ||
| int | b ) |
Constructor.
|
overridevirtual |
Drawing a figure.
Implements graphic_primitive.
|
overridevirtual |
Returns the coordinates of a figure.
Implements graphic_primitive.
|
overridevirtual |
Set the background color of the shape.
Implements graphic_primitive.
|
overridevirtual |
Setting new coordinates for the figure.
Implements graphic_primitive.
| bool triangle::set_geometry | ( | int | base, |
| int | a, | ||
| int | b ) |
Set triangle geometry.
|
overridevirtual |
Set line color.
Implements graphic_primitive.