12 namespace datastructure {
24 double center_x, center_y;
32 virtual string getShapeType()
const override {
42 setCircle(0., 0., 1.);
50 setCircle (0., 0., r);
58 Circle (
double cx,
double cy,
double r) {
62 throw "Illegal value for radius. Must be positive";
81 throw "Illegal value for radius. Must be positive";
95 throw "Illegal value for radius. Must be positive";
117 string shape_json = getSymbolAttributeRepresentation();
122 to_string(center_x) +
COMMA + to_string(center_y) +
This class defines a circle and is part of the symbol collection. A circle has a radius.
Definition: Circle.h:21
Circle()
Definition: Circle.h:41
void setRadius(double r)
This method sets the radius of the circle.
Definition: Circle.h:79
double getRadius()
This method returns the radius of the circle.
Definition: Circle.h:71
void setCircle(double cx, double cy, double r)
This method sets the circle dimensions.
Definition: Circle.h:92
double getCenterX() const
Definition: Circle.h:103
const string getSymbolRepresentation() const override
Definition: Circle.h:115
void setCenter(double cx, double cy)
Definition: Circle.h:98
Circle(double r)
Definition: Circle.h:49
Circle(double cx, double cy, double r)
Definition: Circle.h:58
double getCenterY() const
Definition: Circle.h:106
This is an abstract class for deriving a number of Symbol shape objects, for use in a SymbolCollectio...
Definition: Symbol.h:31
Support for drawing Bar charts.
Definition: alltypes.h:4
const string COLON
Definition: DataStructure.h:52
const string OPEN_BOX
Definition: DataStructure.h:55
const string COMMA
Definition: DataStructure.h:51
const string CLOSE_BOX
Definition: DataStructure.h:56
const string CLOSE_CURLY
Definition: DataStructure.h:54
const string QUOTE
Definition: DataStructure.h:50