My Project
Loading...
Searching...
No Matches
circle.h
Go to the documentation of this file.
1#ifndef CIRCLE_H
2#define CIRCLE_H
3
4#include "graphic_primitive.h"
5
15{
16public:
18 circle(int x, int y, int radius);
20 void set_line_color(Color color) override;
22 void set_background_color(Color color) override;
24 void set_coordinates(int x, int y) override;
26 void draw() override;
28 std::tuple<int, int> get_coordinates() override;
30 void set_radius(int radius);
31
32private:
33 Color _line_color;
34 Color _background_color;
35 int _x;
36 int _y;
37 int _radius;
38};
39
40#endif // CIRCLE_H
Implementation of a circle figure.
Definition circle.h:15
std::tuple< int, int > get_coordinates() override
Returns the coordinates of a figure.
Definition circle.cpp:29
circle(int x, int y, int radius)
Constructor.
Definition circle.cpp:3
void draw() override
Drawing a figure.
Definition circle.cpp:34
void set_coordinates(int x, int y) override
Setting new coordinates for the figure.
Definition circle.cpp:19
void set_line_color(Color color) override
Set line color.
Definition circle.cpp:9
void set_background_color(Color color) override
Set the background color of the shape.
Definition circle.cpp:14
void set_radius(int radius)
Set circle radius.
Definition circle.cpp:24
Interface for graphic primitives.
Definition graphic_primitive.h:15
Color
Acceptable colors.
Definition graphic_primitive.h:18