Drawing oddity - anyone know why?

Bob Arning arning at charm.net
Mon Jul 13 19:42:27 UTC 1998


On Mon, Jul 13, 1998 8:52 AM, Tim Olson <mailto:tim at jumpnet.com> wrote:

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.


Should be something like:

	port
     copyFrom: buff boundingBox
     in: buff
     to: ((destRectangle origin) translateBy: self origin).


When I do that, the rectangle is always red, as I think you are expecting.



     -- tim

Tim,

Thanks - that did the trick.

Cheers,
Bob





More information about the Squeak-dev mailing list