libsbml-draw
canvas.h
Go to the documentation of this file.
1 /* MIT License
2  */
3 
4 //== FILEDOC =========================================================================
5 
10 //== BEGINNING OF CODE ===============================================================
11 
12 #ifndef __SBNW_LAYOUT_CANVAS_H_
13 #define __SBNW_LAYOUT_CANVAS_H_
14 
15 //== INCLUDES ========================================================================
16 
17 #include "SagittariusCore.h"
18 #include "autolayoutSBML.h"
19 #include "box.h"
20 
21 //-- C++ code --
22 #ifdef __cplusplus
23 
24 namespace LibsbmlDraw {
25 
28  class Canvas {
29  public:
30  Canvas() : _w(0), _h(0) {}
31 
32  Canvas(Real width, Real height) : _w(width), _h(height) {}
33 
35  Real getWidth() const;
36 
38  Real getHeight() const;
39 
41  void setWidth(Real w);
42 
44  void setHeight(Real h);
45 
47  Box getBox() const { return Box(Point(0,0), Point(getWidth(),getHeight())); }
48 
49  protected:
50  // member vars
52  Real _w;
53 
55  Real _h;
56  };
57 
58 }
59 
60 #endif
61 
62 #endif
SAGITTARIUS_REAL Real
Make Real visible to C. Consider letting Real lie in top namespace.
Definition: SagittariusCommon.h:112
A box.
First file included.