[Gambas-user] painting graph to image continuously

Fabien Bodard gambas.fr at ...626...
Sun Dec 19 12:41:10 CET 2010


all the draw need to be done in the drawing area witch have the
property painted to true (for use the paint class)

never draw from the outside

paint.begin is form images

normally if your program have a good desing all the draw can be done
in the _draw event. It's like a game loop

2010/12/19 wally <wally at ...2037...>:
> On Sunday 19 December 2010 11:33:39 Fabien Bodard wrote:
>> This is the vectorial vertion (use the painter class)
>>
>> 2010/12/18 wally <wally at ...2037...>:
>> > On Saturday 18 December 2010 14:44:22 Fabien Bodard wrote:
>> >> ok wally this is the full demo of what you want to do, and what you
>> >> need to do for that. I use like often in gambas
>> >> a data/view model ... the drawingarea is just a viewer for the data
>> >> and the _draw event contain the rules do draw the datas.
>> >> The datas are stored in an array $aDatas.
>> >>
>> >> The Timer emulate the datas entry
>> >>
>> >> 2010/12/18 Fabien Bodard <gambas.fr at ...626...>:
>> >> >> Fabian,
>> >> >>
>> >> >> yes, you are right, this may be a problem.
>> >> >> I will try to collect the data as short as possible in a data-array
>> >> >> and display always only the graph of a segment of this array.
>> >> >> Your DemoGraph was helpful to see how the _draw event is
>> >> >> used and i'll try this way too.
>> >> >> But for now i would like to know how the DrawingArea.Resize
>> >> >> works internally and why there are differences in GB2 and GB3.
>> >> >>
>> >> >> wally
>> >> >>
>> >> >
>> >> > Resize is a procedure inherited from control ... it just resize the
>> >> > controle ... but can have conflict with autoarrangement.
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Fabien Bodard
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Fabien Bodard
>> >>
>> >
>> >
>> > Fabian,
>> >
>> > thanks a lot for your hits and deno files !  :)
>> >
>> > Please have a look on the attached design and let me know your opinion
>> > about this. Draw is little more ugly than paint or cairo but i can live
> with
>> > that  (for now)
>> >
>> > wally
>> >
>> >
>> >
> ------------------------------------------------------------------------------
>> > Lotusphere 2011
>> > Register now for Lotusphere 2011 and learn how
>> > to connect the dots, take your collaborative environment
>> > to the next level, and enter the era of Social Business.
>> > http://p.sf.net/sfu/lotusphere-d2d
>> > _______________________________________________
>> > Gambas-user mailing list
>> > Gambas-user at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>> >
>> >
>>
>>
>>
>> --
>> Fabien Bodard
>>
>
>
> Fabian,
>
> thank you very much, This is interesting, i tried to paint and got "already
> drawing" message when applied paint inside _draw event.
> Need to study your version first.
>
> wally
>
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> 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