My Project
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
graphic_primitive Class Referenceabstract

Interface for graphic primitives. More...

#include <graphic_primitive.h>

Inheritance diagram for graphic_primitive:
Inheritance graph
Collaboration diagram for graphic_primitive:
Collaboration graph

Public Types

enum class  Color { RED , GREEN , BLUE }
 Acceptable colors. More...
 
enum class  Type { CICLE , RECTANGLE , SQUARE , TRIANGLE }
 Acceptable shape types. More...
 

Public Member Functions

 graphic_primitive ()
 Constructor.
 
virtual ~graphic_primitive ()
 Destructor.
 
virtual void set_line_color (Color color)=0
 Set line color.
 
virtual void set_background_color (Color color)=0
 Set the background color of the shape.
 
virtual void set_coordinates (int x, int y)=0
 Setting new coordinates for the figure.
 
virtual std::tuple< int, int > get_coordinates ()=0
 Returns the coordinates of a figure.
 
virtual void draw ()=0
 Drawing a figure.
 

Detailed Description

Interface for graphic primitives.

Member Enumeration Documentation

◆ Color

enum class graphic_primitive::Color
strong

Acceptable colors.

Enumerator
RED 
GREEN 
BLUE 

◆ Type

enum class graphic_primitive::Type
strong

Acceptable shape types.

Enumerator
CICLE 
RECTANGLE 
SQUARE 
TRIANGLE 

Constructor & Destructor Documentation

◆ graphic_primitive()

graphic_primitive::graphic_primitive ( )

Constructor.

◆ ~graphic_primitive()

graphic_primitive::~graphic_primitive ( )
virtual

Destructor.

Member Function Documentation

◆ draw()

virtual void graphic_primitive::draw ( )
pure virtual

Drawing a figure.

Implemented in circle, rectangle, square, and triangle.

◆ get_coordinates()

virtual std::tuple< int, int > graphic_primitive::get_coordinates ( )
pure virtual

Returns the coordinates of a figure.

Implemented in circle, rectangle, square, and triangle.

◆ set_background_color()

virtual void graphic_primitive::set_background_color ( Color color)
pure virtual

Set the background color of the shape.

Implemented in circle, rectangle, square, and triangle.

◆ set_coordinates()

virtual void graphic_primitive::set_coordinates ( int x,
int y )
pure virtual

Setting new coordinates for the figure.

Implemented in circle, rectangle, square, and triangle.

◆ set_line_color()

virtual void graphic_primitive::set_line_color ( Color color)
pure virtual

Set line color.

Implemented in circle, rectangle, square, and triangle.


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