21 #include <cairo/cairo.h> 23 #define CAIROBOX_DEFAULT_START_ORDINATE 0. 24 #define CAIROBOX_DEFAULT_WIDTH_HEIGHT 10. 25 #define CAIROBOX_DEFAULT_FILLED false 54 CairoBox(cairo_t *cr,
float xBase,
float yBase,
float w,
float h,
bool fill) {
73 void boxSettings(
float xBase,
float yBase,
float w,
float h,
bool fill) {
89 void draw(cairo_t *cr,
float xBase,
float yBase,
float w,
float h,
bool fill) {
100 void draw(cairo_t *cr,
float xBase,
float yBase) {
109 cairo_rectangle(cr, x, y, width, height);
145 void setXY(
float xBase,
float yBase) {
160 #endif // CAIROBOX_H_
CairoBox(cairo_t *cr, float xBase, float yBase, float w, float h, bool fill)
void setWidthHeight(int widthIn, int heightIn)
CairoBox()
Empty constructor - sets default start point and width, height.
float height
The box height.
float y
The base coordinate.
#define CAIROBOX_DEFAULT_WIDTH_HEIGHT
The default width and height for the box.
void draw(cairo_t *cr, float xBase, float yBase, float w, float h, bool fill)
void draw(cairo_t *cr, float xBase, float yBase)
Draw the box using the member variable state to define the box.
virtual ~CairoBox()
Destructor.
float x
The base ordinate.
#define CAIROBOX_DEFAULT_START_ORDINATE
The default starting ordinate/coordinate for the box.
bool filled
Whether to fill the box.
void boxSettings(float xBase, float yBase, float w, float h, bool fill)
void setXY(float xBase, float yBase)
#define CAIROBOX_DEFAULT_FILLED
The default fill value.