gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
CairoBox Class Reference

#include <CairoBox.H>

Public Member Functions

 CairoBox ()
 Empty constructor - sets default start point and width, height. More...
 
 CairoBox (cairo_t *cr, float xBase, float yBase, float w, float h, bool fill)
 
virtual ~CairoBox ()
 Destructor. More...
 
void boxSettings (float xBase, float yBase, float w, float h, bool fill)
 
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. More...
 
void draw (cairo_t *cr)
 
float getX (void)
 
float getY (void)
 
float getWidth (void)
 
float getHeight (void)
 
void setXY (float xBase, float yBase)
 
void setWidthHeight (int widthIn, int heightIn)
 

Private Attributes

float x
 The base ordinate. More...
 
float y
 The base coordinate. More...
 
float width
 The box with. More...
 
float height
 The box height. More...
 
bool filled
 Whether to fill the box. More...
 

Detailed Description

Given a Cairo context, draw a box. The box is specified by a starting point (x, y) a width, height and whether it is filled or not. Assumes that the Cairo context is already configured for line width and colour.

Examples:
CairoBoxTest.C.

Definition at line 31 of file CairoBox.H.

Constructor & Destructor Documentation

◆ CairoBox() [1/2]

CairoBox::CairoBox ( )
inline

Empty constructor - sets default start point and width, height.

Definition at line 39 of file CairoBox.H.

Here is the call graph for this function:

◆ CairoBox() [2/2]

CairoBox::CairoBox ( cairo_t *  cr,
float  xBase,
float  yBase,
float  w,
float  h,
bool  fill 
)
inline

Construct a box given starting point and the width, height and use cairo to stroke or fill. The Cairo context which is passed in should already be configured for line width and colour

Parameters
crThe cairo context to draw in
xBaseThe x box corner ordinate
yBaseThe y box corner coordinate
wThe width of the box
hThe height of the box
fillFill the arrow head

Definition at line 54 of file CairoBox.H.

Here is the call graph for this function:

◆ ~CairoBox()

virtual CairoBox::~CairoBox ( )
inlinevirtual

Destructor.

Definition at line 63 of file CairoBox.H.

Member Function Documentation

◆ boxSettings()

void CairoBox::boxSettings ( float  xBase,
float  yBase,
float  w,
float  h,
bool  fill 
)
inline

Set the box size given starting point and the width, height and the cairo stroke or fill.

Parameters
xBaseThe x box corner ordinate
yBaseThe y box corner coordinate
wThe width of the box
hThe height of the box
fillFill the arrow head

Definition at line 73 of file CairoBox.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw() [1/3]

void CairoBox::draw ( cairo_t *  cr,
float  xBase,
float  yBase,
float  w,
float  h,
bool  fill 
)
inline

Construct a box given starting point and the width, height and use cairo to stroke or fill. The Cairo context which is passed in should already be configured for line width and colour

Parameters
crThe cairo context to draw in
xBaseThe x box corner ordinate
yBaseThe y box corner coordinate
wThe width of the box
hThe height of the box
fillFill the arrow head
Examples:
CairoBoxTest.C.

Definition at line 89 of file CairoBox.H.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw() [2/3]

void CairoBox::draw ( cairo_t *  cr,
float  xBase,
float  yBase 
)
inline

Draw the box using the member variable state to define the box.

Construct a box given starting point and the width, height and use cairo to stroke or fill. The Cairo context which is passed in should already be configured for line width and colour

Parameters
crThe cairo context to draw in
xBaseThe x box corner ordinate
yBaseThe y box corner coordinate

Definition at line 100 of file CairoBox.H.

Here is the call graph for this function:

◆ draw() [3/3]

void CairoBox::draw ( cairo_t *  cr)
inline

Definition at line 106 of file CairoBox.H.

◆ getHeight()

float CairoBox::getHeight ( void  )
inline

Get the height

Returns
the height
Examples:
SelectionAreaTest.C.

Definition at line 137 of file CairoBox.H.

Here is the caller graph for this function:

◆ getWidth()

float CairoBox::getWidth ( void  )
inline

Get the width

Returns
the with
Examples:
SelectionAreaTest.C.

Definition at line 131 of file CairoBox.H.

Here is the caller graph for this function:

◆ getX()

float CairoBox::getX ( void  )
inline

Get the ordinate

Returns
the ordinate (x)

Definition at line 119 of file CairoBox.H.

Here is the caller graph for this function:

◆ getY()

float CairoBox::getY ( void  )
inline

Get the coordinate

Returns
the coordinate (y)

Definition at line 125 of file CairoBox.H.

Here is the caller graph for this function:

◆ setWidthHeight()

void CairoBox::setWidthHeight ( int  widthIn,
int  heightIn 
)
inline

Set a new width and height for the box

Parameters
widthInThe new box width
heightInThe new box height

Definition at line 154 of file CairoBox.H.

Here is the caller graph for this function:

◆ setXY()

void CairoBox::setXY ( float  xBase,
float  yBase 
)
inline

Set a new x and y location for the box

Parameters
xBaseThe x box corner ordinate
yBaseThe y box corner coordinate

Definition at line 145 of file CairoBox.H.

Here is the caller graph for this function:

Member Data Documentation

◆ filled

bool CairoBox::filled
private

Whether to fill the box.

Definition at line 36 of file CairoBox.H.

◆ height

float CairoBox::height
private

The box height.

Definition at line 35 of file CairoBox.H.

◆ width

float CairoBox::width
private

The box with.

Definition at line 34 of file CairoBox.H.

◆ x

float CairoBox::x
private

The base ordinate.

Definition at line 32 of file CairoBox.H.

◆ y

float CairoBox::y
private

The base coordinate.

Definition at line 33 of file CairoBox.H.


The documentation for this class was generated from the following file:
gtkIOStream: CairoBox Class Reference
GTK+ IOStream  Beta