#include <wedge.h>
Public Member Functions | |
Wedge (Canvas *canvas, double x0, double y0, double x1, double y1, double width) | |
Wedge (Group *parent, double x0, double y0, double x1, double y1, double width, ItemClient *client=NULL) | |
virtual | ~Wedge () |
void | SetPosition (double x0, double y0, double x1, double y1) |
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 () |
Filled equilateral triangle.
Definition at line 39 of file wedge.h.
gccv::Wedge::Wedge | ( | Canvas * | canvas, | |
double | x0, | |||
double | y0, | |||
double | x1, | |||
double | y1, | |||
double | width | |||
) |
canvas | a Canvas. | |
x0 | the triangle top horizontal position. | |
y0 | the triangle top vertical position. | |
x1 | the horizontal position of the canter of the triangle base. | |
y1 | the vertical position of the canter of the triangle base. | |
width | the triangle base width. |
gccv::Wedge::Wedge | ( | Group * | parent, | |
double | x0, | |||
double | y0, | |||
double | x1, | |||
double | y1, | |||
double | width, | |||
ItemClient * | client = NULL | |||
) |
parent | the Group to which the new Wedge will be added. | |
x0 | the triangle top horizontal position. | |
y0 | the triangle top vertical position. | |
x1 | the horizontal position of the canter of the triangle base. | |
y1 | the vertical position of the canter of the triangle base. | |
width | the triangle base width. | |
client | the ItemClient for the new Wedge if any. |
virtual gccv::Wedge::~Wedge | ( | ) | [virtual] |
The destructor.
double gccv::Wedge::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::Wedge::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::Hash.
void gccv::Wedge::Move | ( | double | x, | |
double | y | |||
) | [virtual] |
x | the horizontal deplacement | |
y | the vertical deplacement |
Reimplemented from gccv::Item.
void gccv::Wedge::SetPosition | ( | double | x0, | |
double | y0, | |||
double | x1, | |||
double | y1 | |||
) |
x0 | the triangle top horizontal position. | |
y0 | the triangle top vertical position. | |
x1 | the horizontal position of the canter of the triangle base. | |
y1 | the vertical position of the canter of the triangle base. |
void gccv::Wedge::UpdateBounds | ( | ) | [protected, virtual] |
Evaluates the Wedge bounds.
Reimplemented from gccv::Item.