[squeak-dev] Re: How Moprhs is rendered

Hilaire Fernandes hilaire.fernandes at edu.ge.ch
Tue Jul 19 19:38:17 UTC 2011

Thanks for the tips Andrea! In between I remembered about reading on
World doOneCycleNow then figure out the use of #debugShowDamage


Le 19/07/2011 17:00, Andreas Raab a écrit :
> On 7/19/2011 12:46, Hilaire Fernandes wrote:
>> To optimise the DrGeo canvas (get it faster), I try to understand in
>> detail how is done the rendering of Morphs embedded in a pasteupmorph.
>> I did not find any detailed information on the Internet about that.
>> Any pointer?
> No such thing. If you're interested in the details you'll have to be
> more specific about what aspect you're interested in. Are you trying to
> make your graphics faster? In that case enable the preference
> #debugShowDamage and have a look at what is drawn when you change your
> model. Then add a profiler loop in your model which looks like this:
> MessageTally spyOn:[
>     1 to: 100 do:[:i|
>         self changed. "whatever caused your model to change"
>         World doOneCycleNow. "force redraw"
>     ].
> ].
> At this point you should have an idea about where to look next.
> Hope this helps.
> Cheers,
>   - Andreas
>> Right now, DrGeo canvas is a pasteUpMorph, the line, segment, point,
>> circle, etc. are all Morph added in the pasteUpMoprh. When the model of
>> a geometry sketch is updated, then all the Morphs view are updated in
>> one shot (it appeared to be faster than to climb the model tree to
>> update only the morphs needing update)
>> Hilaire

Education 0.2 -- http://blog.ofset.org/hilaire

More information about the Squeak-dev mailing list