#include <rectangle.h>
Public Member Functions | |
Rectangle (Canvas *canvas, double x, double y, double width, double height) | |
Rectangle (Group *parent, double x, double y, double width, double height, ItemClient *client=NULL) | |
virtual | ~Rectangle () |
void | SetPosition (double x, double y, double width, double height) |
void | GetPosition (double &x, double &y) const |
void | GetPosition (double &x, double &y, double &width, double &height) const |
double | Distance (double x, double y, Item **item) const |
void | Draw (cairo_t *cr, bool is_vector) const |
void | Move (double x, double y) |
Protected Member Functions | |
void | UpdateBounds () |
Implements rectangular, optionally filled, items.
Definition at line 39 of file rectangle.h.
gccv::Rectangle::Rectangle | ( | Canvas * | canvas, | |
double | x, | |||
double | y, | |||
double | width, | |||
double | height | |||
) |
gccv::Rectangle::Rectangle | ( | Group * | parent, | |
double | x, | |||
double | y, | |||
double | width, | |||
double | height, | |||
ItemClient * | client = NULL | |||
) |
parent | the Group to which the new Text will be added. | |
x | the top left corner horizontal position. | |
y | the top left corner vertical position. | |
width | the rectangle width. | |
height | the rectangle height. | |
client | the ItemClient for the new Text if any. |
virtual gccv::Rectangle::~Rectangle | ( | ) | [virtual] |
The destructor.
double gccv::Rectangle::Distance | ( | double | x, | |
double | y, | |||
Item ** | item | |||
) | const [virtual] |
x | horizontal position | |
y | vertical position | |
item | where to store the Item. |
Reimplemented from gccv::Item.
void gccv::Rectangle::Draw | ( | cairo_t * | cr, | |
bool | is_vector | |||
) | const [virtual] |
cr | a cairo_t. | |
is_vector | whether the cairo_t is a vectorial context. |
Reimplemented from gccv::Item.
Reimplemented in gccv::Text.
void gccv::Rectangle::GetPosition | ( | double & | x, | |
double & | y, | |||
double & | width, | |||
double & | height | |||
) | const |
x | where to store the top left corner horizontal position. | |
y | where to store the top left corner vertical position. | |
width | where to store the rectangle width. | |
height | where to store the rectangle height. |
void gccv::Rectangle::GetPosition | ( | double & | x, | |
double & | y | |||
) | const |
x | where to store the top left corner horizontal position. | |
y | where to store the top left corner vertical position. |
void gccv::Rectangle::Move | ( | double | x, | |
double | y | |||
) | [virtual] |
x | the horizontal deplacement | |
y | the vertical deplacement |
Reimplemented from gccv::Item.
Reimplemented in gccv::Text.
void gccv::Rectangle::SetPosition | ( | double | x, | |
double | y, | |||
double | width, | |||
double | height | |||
) |
x | the top left corner new horizontal position. | |
y | the top left corner new vertical position. | |
width | the rectangle new width. | |
height | the rectangle new height. |
void gccv::Rectangle::UpdateBounds | ( | ) | [protected, virtual] |
Evaluates the Rectangle bounds.
Reimplemented from gccv::Item.