transforming points from global to local coordinates
Bob Arning
arning at charm.net
Wed Feb 27 01:55:19 UTC 2002
Craig,
The answer is that all coordinates are *global* unless there is a transformation morph somewhere in the hierarchy and then coordinates of morphs below that point are local to the transformation morph. In your example, global == local.
Cheers,
Bob
On Tue, 26 Feb 2002 17:13:56 -0800 Craig Latta <Craig.Latta at NetJam.ORG> wrote:
> I would expect (aMorph globalPointToLocal: aPointInGlobalCoordinates)
>to answer aPointInGlobalCoordinates as translated into the local
>coordinates of aMorph. This doesn't seem to be the case... should it? If
>not, what should I do instead, and how could I have learned this?
>
>
> thanks,
>
>-C
>
>***
>
>"E.g., I would expect 25 at 25 from..."
>
>| morph |
>
>morph _ (
> (Morph new)
> extent: 50 at 50;
> position: 300 at 300).
>morph globalPointToLocal: morph bounds center
>
>"...but I get 325 at 325 instead."
More information about the Squeak-dev
mailing list
|