BitmapFillStyles and TransformMorph (aka sliding textures)

Ken Causey ken at kencausey.com
Fri Apr 23 14:38:41 UTC 2004


I'm working on a prototype for a game in Squeak.  I was making good
progress by using a TransformMorph for my window view of a larger
world.  That was until I tried using BitmapFillStyles on submorphs of
the TransformMorph.  Balloon draws the texture based on its origin and
the origin of the canvas.  This means that when the view (transform) of
the TransformMorph moves the morphs move relative to the canvas
resulting in a flowing texture fixed relative to the view but not
relative to the game world.  I tried hacking around this by
recalculating the origin for the texture at draw time but I realized
that by changing the origin I'm eradicating knowledge that I need for
the next draw cycle.

I'm considering refactoring OrientedStyle in some way but am interested
in comments anyone else has on this.

Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040423/530c930d/attachment.pgp


More information about the Squeak-dev mailing list