codac
codac_Figure.h
Go to the documentation of this file.
1 
12 #ifndef __CODAC_FIGURE_H__
13 #define __CODAC_FIGURE_H__
14 
15 #include <string>
16 #include "codac_Interval.h"
17 #include "codac_IntervalVector.h"
18 
19 namespace codac
20 {
25  class Figure
26  {
27  public:
28 
34  Figure(const std::string& fig_name);
35 
39  ~Figure() {};
40 
46  int x() const;
47 
53  int y() const;
54 
60  int width() const;
61 
67  int height() const;
68 
74  const std::string name() const;
75 
81  const IntervalVector& view_box() const;
82 
86  void reset_view_box();
87 
96  void set_properties(int x, int y, int width, int height);
97 
98 
99  protected:
100 
110  static double trunc_inf(double x);
111 
121  static const Interval trunc_inf(const Interval& x);
122 
132  static const IntervalVector trunc_inf(const IntervalVector& x);
133 
134  protected:
135 
136  const std::string m_name;
137  int m_x = 100, m_y = 100, m_width = 600, m_height = 300;
138  IntervalVector m_view_box = IntervalVector(2, Interval::EMPTY_SET);
139  };
140 }
141 
142 #endif
void reset_view_box()
Reset the view box of this figure.
const std::string m_name
figure name
Definition: codac_Figure.h:136
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition: codac_capd_helpers.h:9
const std::string name() const
Returns the name of this figure.
int m_height
figure properties
Definition: codac_Figure.h:137
IntervalVector m_view_box
view box
Definition: codac_Figure.h:138
int height() const
Returns the height of this figure.
void set_properties(int x, int y, int width, int height)
Sets the properties (coordinates and dimensions) of this figure.
int y() const
Returns the vertical coordinate of this figure.
~Figure()
Figure destructor.
Definition: codac_Figure.h:39
int width() const
Returns the width of this figure.
Two-dimensional graphical item.
Definition: codac_Figure.h:25
static double trunc_inf(double x)
Returns a representable value of any double variable x
Figure(const std::string &fig_name)
Creates a Figure.
int x() const
Returns the horizontal coordinate of this figure.
const IntervalVector & view_box() const
Returns the real values displayed by this figure.