On 07/03/2015 04:32 AM, Pierre Guillot wrote:
> Pierre: what is the syntax for the "path" method, and what does it do?

I can't find the screenshot atm, but you had a message box with the selector "path" in it, followed by a series of numbers.

What does that message do?

-Jonathan


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) :
ebox_start_layer (t_ebox *x, t_symbol *name, float width, float height)

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 :
ebox_end_layer (t_ebox *x, t_symbol *name)

Then we paint the layer :
ebox_paint_layer (t_ebox *x, t_symbol *name, float x_p, float y_p)

if something has changed (an attribute or whatever you want) and we need to repaint a layer, we invalidate the layer with :
ebox_invalidate_layer (t_ebox *x, t_symbol *name)


Graphical part of the wrapper : 
http://cicm.github.io/CicmWrapper/a00008.html
Gui box part f the wrapper :
http://cicm.github.io/CicmWrapper/a00006.html




_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list