[comp.sys.next] Base coords to view coords

scottsm@brahms.udel.edu (Scott M Stark) (05/06/91)

I would like to convert a point returned in an NXEvent from its base
coordinates to a view coordinate system.  There are several routines
to covert coords between views and between the screen and base coordinate
systems, but I have not found one to covert a base coordinate to a
view's coordinate system.  I would appreciate any suggestions on how to 
do this without having to trapse through the view heirarchy.


Scott

aozer@next.com (Ali Ozer) (05/07/91)

In article <21127@brahms.udel.edu> Scott M Stark writes:
>I would like to convert a point returned in an NXEvent from its base
>coordinates to a view coordinate system.  There are several routines
>to covert coords between views and between the screen and base coordinate
>systems, but I have not found one to covert a base coordinate to a
>view's coordinate system.  I would appreciate any suggestions on how to 
>do this without having to trapse through the view heirarchy.

Calling the following method with aView == nil will convert the point from
the base coordinate system of the window to the view's coordinate system.

- convertPoint:(NXPoint *)aPoint fromView:aView;

Ali, Ali_Ozer@NeXT.com