andrew@isgtec.UUCP (Andrew) (10/12/89)
I have heard that in order to use memory pixrects with X11/NeWS, I MUST use the PIXWIN interface "as a compatibility veneer over Xlib." Is this true? Is there no way to use X windows to display a memory pixrect into? What I am trying to accomplish is the following: 1) Use X11 as the user interface 2) Use memory PIXRECTS as the process for displaying high resolution graphics. I realize that I canot use this client remotely, but that is a decision that has been made. I want to use the memory PIXRECTs because of the difference in speed achieved in using PIXRECTs over X. (X is 10 times slower!!) 3) Use X as the complete window manager, with the PIXRECT images being drawn in these X windows. Therefore I want to avoid using the PIXWIN interface, and the Notifier. The problem that I have run into is that if I take an image contained in a memory pixrect, and use the pr_rop routine to display the image to the screen (while running X11/NeWS) the system crashes. (The system is a SPARC Station 1) Is there some kind of preparation of the screen that I should perform before displaying the pixrect image? (for example, locking the screen?) Is it possible to avoid using the PIXWIN interface? Does anyone have any similar code that they have written that I may use as an example?` Any information would be greatly appreciated. Signed Frustrated!!! Thankyou, in advance. -- Andrew MacLean ...uunet!mnetor!lsuc!isgtec!andrew Success is a journey, not an adventure! ...utzoo!lsuc!isgtec!andrew ISG Technologies Inc. 3030 Orlando Dr. Mississauga. Ont. Can. L4V 1S8
tomj@snowking.ebay.sun.COM (Tom Jacobs) (10/24/89)
Andrew MacLean writes: > I have heard that in order to use memory pixrects with X11/NeWS, I MUST use > the PIXWIN interface "as a compatibility veneer over Xlib." Not necessarily true, remember Pixwin is just a windowing interface to using Pixrects and Pixrects are just a client-side representation of data. XView has reimplemented the Pixwin interface by translating the Pixwin calls to Xlib calls. However, not all of the logic of Pixrect/Pixwin translates well in the Xlib graphics. This is because the PIX_* graphics OPS made assumptions about foreground and background colors. The result is that pixwin (not pixrect) calls may work on one server, but not on another. > Is this true? Is there no way to use X windows to display a memory pixrect > into? No, you can do the translation of the mpr to a Pixmap by calling XCreateImage(). Below is what XView does to create a simple bitmap from a mpr... xv_image_1(dest_info) = r_ximage = (XImage *) XCreateImage(display, visual, 1, XYBitmap, 0, (char *) mpr_d(((Pixrect *) src))->md_image, 0, 0, MPR_LINEBITPAD, mpr_d(((Pixrect *) src))->md_linebytes); The above is from the XView source (usr.lib/libxvin/pw/xv_rop.c). ... ... > The problem that I have run into is that if I take an image contained in a > memory pixrect, and use the pr_rop routine to display the image to the screen > (while running X11/NeWS) the system crashes. (The system is a SPARC Station 1) Under XView, we first create the Pixmap and then copy that into the window. > Is there some kind of preparation of the screen that I should perform before > displaying the pixrect image? (for example, locking the screen?) Is it > possible to avoid using the PIXWIN interface? Does anyone have any similar > code that they have written that I may use as an example?` Get the XView source and look at our Pixwin compatibility code (usr.lib/libxvin/pw) > Any information would be greatly appreciated. > > Signed Frustrated!!! > > Thankyou, in advance. > -- > Andrew MacLean ...uunet!mnetor!lsuc!isgtec!andrew > Success is a journey, not an adventure! ...utzoo!lsuc!isgtec!andrew > ISG Technologies Inc. 3030 Orlando Dr. Mississauga. Ont. Can. L4V 1S8 Tom Jacobs (tomj@sun.com -or- ..!sun!tomj) Sun Microsystems, Inc. Mountain View, CA 94043