Drawing oddity - anyone know why?
tim at jumpnet.com
Mon Jul 13 12:52:44 UTC 1998
>What I can't understand is why the morph draws in green while being moved,
>but draws in red when placed on the desktop. If you know, I'd love to hear
You need to add in the origin offset of the world's FormCanvas when you
draw upon it directly through its GrafPort, otherwise you are Blitting
your red rectangle starting at the origin of the Display, rather than the
origin of the Morphic window.
> port copyFrom: buff boundingBox in: buff to: destRectangle origin.
Should be something like:
copyFrom: buff boundingBox
to: ((destRectangle origin) translateBy: self origin).
When I do that, the rectangle is always red, as I think you are expecting.
More information about the Squeak-dev