Equilateral triangle.
More...
#include <wedge.h>
|
| 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) |
|
void | SetAutoColor (bool val) |
|
bool | GetAutoColor (void) const |
|
| Item (Canvas *canvas) |
|
| Item (Group *parent, ItemClient *client=NULL) |
|
virtual | ~Item () |
|
void | GetBounds (double &x0, double &y0, double &x1, double &y1) const |
|
void | Invalidate () const |
|
void | SetVisible (bool visible) |
|
virtual void | BuildPath (cairo_t *cr) const |
|
virtual bool | Draw (cairo_t *cr, double x0, double y0, double x1, double y1, bool is_vector) const |
|
bool | IsTopLevel () const |
|
void | SetClient (ItemClient *val) |
|
ItemClient * | GetClient (void) |
|
Group const * | GetParent (void) const |
|
bool | GetVisible (void) const |
|
void | SetOperator (cairo_operator_t val) |
|
cairo_operator_t | GetOperator (void) const |
|
Equilateral triangle.
Filled equilateral triangle.
Definition at line 39 of file wedge.h.
◆ Wedge() [1/2]
gccv::Wedge::Wedge |
( |
Canvas * |
canvas, |
|
|
double |
x0, |
|
|
double |
y0, |
|
|
double |
x1, |
|
|
double |
y1, |
|
|
double |
width |
|
) |
| |
- Parameters
-
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. |
Creates a new Wedge and sets it as a child of the root Group of canvas.
◆ Wedge() [2/2]
gccv::Wedge::Wedge |
( |
Group * |
parent, |
|
|
double |
x0, |
|
|
double |
y0, |
|
|
double |
x1, |
|
|
double |
y1, |
|
|
double |
width, |
|
|
ItemClient * |
client = NULL |
|
) |
| |
- Parameters
-
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. |
Creates a new Wedge inside parent and sets client as its associated ItemClient.
◆ ~Wedge()
virtual gccv::Wedge::~Wedge |
( |
| ) |
|
|
virtual |
◆ Distance()
double gccv::Wedge::Distance |
( |
double |
x, |
|
|
double |
y, |
|
|
Item ** |
item |
|
) |
| const |
|
virtual |
- Parameters
-
x | horizontal position |
y | vertical position |
item | where to store the Item. |
Implementation of Item::Distance() for the Wedge class. Sets item to this.
Reimplemented from gccv::Item.
◆ Draw()
void gccv::Wedge::Draw |
( |
cairo_t * |
cr, |
|
|
bool |
is_vector |
|
) |
| const |
|
virtual |
- Parameters
-
cr | a cairo_t. |
is_vector | whether the cairo_t is a vectorial context. |
Draws the Wedge to cr.
Reimplemented from gccv::Item.
◆ GetAutoColor()
gccv::Wedge::GetAutoColor |
( |
void |
| ) |
const |
|
inline |
- Returns
- the line color mode, true if automatic, false otherwise.
Definition at line 168 of file wedge.h.
◆ Move()
void gccv::Wedge::Move |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
virtual |
- Parameters
-
x | the horizontal deplacement |
y | the vertical deplacement |
Moves the Wedge.
Reimplemented from gccv::Item.
◆ SetAutoColor()
gccv::Wedge::SetAutoColor |
( |
bool |
auto | ) |
|
|
inline |
- Parameters
-
auto | whether to use a color from the theme. |
if auto is true, the color used to draw the item will be retrieved from the Gtk+ theme instead of using the LineColor member.
Definition at line 168 of file wedge.h.
◆ SetPosition()
void gccv::Wedge::SetPosition |
( |
double |
x0, |
|
|
double |
y0, |
|
|
double |
x1, |
|
|
double |
y1 |
|
) |
| |
- Parameters
-
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. |
Setes the new position for the Wedge instance.
◆ UpdateBounds()
void gccv::Wedge::UpdateBounds |
( |
| ) |
|
|
protectedvirtual |
◆ m_xe1
double gccv::Wedge::m_xe1 |
|
protected |
The horizontal position of the first corner at end position. This value is automatically set and should not be changed by code external to this class.
Definition at line 132 of file wedge.h.
◆ m_xe2
double gccv::Wedge::m_xe2 |
|
protected |
The horizontal position of the second corner at end position. This value is automatically set and should not be changed by code external to this class.
Definition at line 142 of file wedge.h.
◆ m_xend
double gccv::Wedge::m_xend |
|
protected |
The horizontal central end position.
Definition at line 123 of file wedge.h.
◆ m_xstart
double gccv::Wedge::m_xstart |
|
protected |
The horizontal start position.
Definition at line 115 of file wedge.h.
◆ m_ye1
double gccv::Wedge::m_ye1 |
|
protected |
The vertical position of the first corner at end position. This value is automatically set and should not be changed by code external to this class.
Definition at line 137 of file wedge.h.
◆ m_ye2
double gccv::Wedge::m_ye2 |
|
protected |
The vertical position of the second corner at end position. This value is automatically set and should not be changed by code external to this class.
Definition at line 147 of file wedge.h.
◆ m_yend
double gccv::Wedge::m_yend |
|
protected |
The vertical central end position.
Definition at line 127 of file wedge.h.
◆ m_ystart
double gccv::Wedge::m_ystart |
|
protected |
The vertical start position.
Definition at line 119 of file wedge.h.
The documentation for this class was generated from the following file: