My Project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
triangle Class Reference

Implementation of a triangle figure. More...

#include <triangle.h>

Inheritance diagram for triangle:
Inheritance graph
Collaboration diagram for triangle:
Collaboration graph

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...
 

Detailed Description

Implementation of a triangle figure.

Constructor & Destructor Documentation

◆ triangle()

triangle::triangle ( int x,
int y,
int base,
int a,
int b )

Constructor.

Member Function Documentation

◆ draw()

void triangle::draw ( )
overridevirtual

Drawing a figure.

Implements graphic_primitive.

◆ get_coordinates()

std::tuple< int, int > triangle::get_coordinates ( )
overridevirtual

Returns the coordinates of a figure.

Implements graphic_primitive.

◆ set_background_color()

void triangle::set_background_color ( Color color)
overridevirtual

Set the background color of the shape.

Implements graphic_primitive.

◆ set_coordinates()

void triangle::set_coordinates ( int x,
int y )
overridevirtual

Setting new coordinates for the figure.

Implements graphic_primitive.

◆ set_geometry()

bool triangle::set_geometry ( int base,
int a,
int b )

Set triangle geometry.

◆ set_line_color()

void triangle::set_line_color ( Color color)
overridevirtual

Set line color.

Implements graphic_primitive.


The documentation for this class was generated from the following files: