Controlling Morphic Drawing Order

Lex Spoon lex at cc.gatech.edu
Thu Mar 18 01:08:58 UTC 2004


> I'm exploring the possibility of game development with Squeak and while
> wanting to leverage the power that Morphic provides I need some
> additional leverage in the drawing order.  In particular I need to be
> able to specify drawing before and after submorph drawing occurs.


It sounds like you have found a way to do what you want: just override
#fullDrawOn: something like:

	fullDrawOn: canvas
		super fullDrawOn: canvas.
		
		"extra drawing stuff"
		
This makes me nervous, though; it might cause tricky drawing errors if
some part of the morphic system is not expecting this.  Have you
considered embedding a separate morph that is in front of the other
submorphs, and having the embedded morph draw the front matter?  That
approach would be more complicated, but it would maintain the normal
drawing approach of Morphic and thus be safer.


-Lex



More information about the Squeak-dev mailing list