Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucbvax!bloom-beacon!dont-send-mail-to-path-lines From: mouse@larry.mcrcim.mcgill.EDU Newsgroups: comp.windows.x Subject: Re: Xlib ---> Postscript Message-ID: <9101091051.AA26658@Larry.McRCIM.McGill.EDU> Date: 9 Jan 91 10:51:46 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 46 > How are Xlib developers handling the problem of printing high-quality > output of the images rendered on the display using Xlib? What do you mean when you say "images"? If you mean pictures like the famous mandrill picture, that's one thing. If you mean something like an xterm session, that's something else. If you mean arbitrary X graphics, that's yet another thing. > Ideally, I'd like a library with an API similar to Xlib, which would > create a Postscript file. (Why do you assume that "[i]deally", "printing" equals "PostScript"? See the last piece I quote below, and my response.) I rather suspect you are dreaming. The X and PostScript rendering models are sufficiently different that this will be extremely difficult at best. As a simple example, consider an X program that does the following: Clear a window to the background color, whatever that is. Create a GC whose function is GXxor and whose foreground color is the XOR of the app's foreground and background. Draw a short fat rectangle with this GC. Draw a tall skinny rectangle, overlapping the other one, with the same GC. Now, what PostScript code do you propose the library generate? Of course, you could always implement some subset, perhaps those things that can be done easily in both X and PostScript. I suspect you will find that such a library is too weak to be useful for very much. (I may be wrong. Anybody actually tried it?) In short, X is a pixel-based model. PostScript bends over backwards to avoid any hint of being pixel-based, and does a fairly thorough job of it. Of course you'll have problems! > The library would generate a Postscript file suitable for printing. A real trick when the printer speaks only Impress :-) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu