The wrapper
offers a layer structure called t_elayer that owns
a set of points.
First we create a
layer for a t_ebox (GUI object) :
To create a path,
you can use several functions :
egraphics_move_to (t_elayer *g,
float x, float y), egraphics_line_to (t_elayer *g,
float x, float y), egraphics_curve_to (t_elayer *g,
float ctrl1x, float ctrl1y, float ctrl2x, float ctrl2y,
float endx, float endy), ect...
The
functions append points to the t_elayer.
Before
drawing all the paths, we apply the matrix transformations
and mark the layer ready to be drawn :
Then we paint the
layer :
if something has
changed (an attribute or whatever you want) and we need to
repaint a layer, we invalidate the layer with :
Graphical part of
the wrapper :
Gui box part f
the wrapper :