Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!mcsun!ukc!dcl-cs!dik From: dik@comp.lancs.ac.uk (Mr R. M. Bentley) Newsgroups: comp.lang.smalltalk Subject: Smalltalk coordinates to screen coordinates Message-ID: <1089@dcl-vitus.comp.lancs.ac.uk> Date: 31 Oct 90 15:15:50 GMT Reply-To: dik@dcl-cs.UUCP (Mr R. M. Bentley) Organization: Department of Computing at Lancaster University, UK. Lines: 28 I am trying to implement a C-program which displays a colored raster image on the screen as a Smalltalk method. The point to position the image is passed to the C function as parameters to the primitive method. I am having trouble mapping the local co-ordinates used in Smalltalk to refer to the Smalltalk display within the Sunview window to absolute display coordinates. What I really want to be able to do is position a colored image within a View. I can get the local origin of the View (using insetDisplayBox) but I need to be able to translate this to global screen co-ordinates for the primitive function. As far as I can see, I have two options: 1. Modify the co-ordinates in Smalltalk before passing to the primitive. 2. Use SunView to locate the Smalltalk window origin and add this as a constant in the C function to the parameters passed from Smalltalk. Currently we're using pixrect onto the frame buffer, opening ("/dev/fb"). I'm told that this problem can be resolved if anyone knows if smalltalk provides a handle to its pixrect. (I am using Smalltalk 2.5). If anyone knows if either of the two approaches is feasible and how to go about it, I would be very grateful for advice/assistance.