[Gambas-user] is there an example for generating curves
Fabien Bodard
gambas.fr at ...626...
Mon Jan 12 12:22:33 CET 2015
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
You ca doing the same fr the second drawing area and of ourse a second
point array.
Don't forget that in gambas many of the control don't store datas,
they are just viewer.
You need some array to store datas and then use them to draw.
Each time drawing area is refreshing you need to redraw the full curve
.(and all things to draw is the view)
Regards,
Fabien Bodard
2015-01-12 10:06 GMT+01:00 rolf <rolf.frogs at ...221...>:
> Hi,
>
> I can manage to draw curves of measured values, when they arrive i.e. the
> curve has to be extendet up to 50 times. And a second measurement session
> should be drawn in a second drawarea.
>
> The gambas documentation about drawarea is not really helpfull in this case.
>
> Is there an example where I can see how to handle two drawing areas and add
> points or lines in them (I think I have to use the cache, but can't see what
> is drawn).
>
> Many thanks for any help
> Rolf
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> vanity: www.gigenet.com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Fabien Bodard
More information about the User
mailing list