[squeak-dev] Re: How Moprhs is rendered

Andreas Raab andreas.raab at gmx.de
Tue Jul 19 15:00:34 UTC 2011


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
>




More information about the Squeak-dev mailing list