Morphic relative placement?

Yoshiki Ohshima yoshiki at squeakland.org
Fri Apr 7 18:08:19 UTC 2006


  Hello,

At Fri, 07 Apr 2006 12:20:39 -0500,
Brian Greskamp wrote:
> 
> Naveen Neelakantam wrote:
> > To get the absolute position of an owner, you can use "self owner 
> > position".  You can thereby convert between absolute and relative 
> > coordinates of a submorph. 
> Yep.  I guess I wasn't thinking.  That should work just fine.

  Almost.  Because Morphs can be rotated and scaled, just offsetting
may not be enough (you may not want to have rotation in something
named "circuit," but parhaps scaling?).

  The examples in, for example HaloMorph>>startDrag:with: shows
something like:

	positionOffset _ dragHandle center - (target point: target position in: owner).

i.e., offsetting by #- and the use of #point:in: would be what you
want.

  Hope this helps,

-- Yoshiki



More information about the Squeak-dev mailing list