[Gambas-user] is there an example for generating curves

rolf rolf.frogs at ...221...
Sun Jan 18 10:54:58 CET 2015


Hello Fabien
> Better than words, this is a demo !
>
> 2015-01-12 12:22 GMT+01:00 Fabien Bodard <gambas.fr at ...626...>:
> > Well.. you need two things in fact . first you can use an array of point
> > :
> >
> > Private $aPoints as new Point[]
> >
> >
> > Then you add in real time your points :
> >
> > $apoint.add(point(x,y))
> > and query the redraw of the drawing area
> >
> > MyDA.refresh
> >
> >
> > Public sub MyDA_Draw()
> >
> >   dim i as integer
> >
> > for i=0 to $aPoints.max -1 step 2
> >
> >   draw.line($apoint[i].x$apoint[i].y,$apoint[i+1].x,$apoint[i+1].y)
> >
> > next
> >
> > end
> >
Many thanks for the working example. 
It's a pitty, that there are so less examples in the documentation, that can 
help to see the use of the function - I miss some in the mediaplayer area.

I found the docs of php or the C++/STL-Online docu very helpful, because there 
ara usually simple example which can be tested with cut'n paste.

Once again,
many thanks.




More information about the User mailing list