Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: Re: X/DEC WINDOWS : HELP Message-ID: <9007010722.AA06006@Larry.McRCIM.McGill.EDU> Date: 1 Jul 90 07:22:23 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 34 > I have just started working with DEC Windows on a DEC workstation. I > have some manuals provided by DEC and for programming with DEC > windows, I felt that the manuals are not so informative. > I am facing these problems : > 1. How to rotate text ? Is there any X routine available? The core X protocol does not support any sort of non-horizontal[%] text. (Various extensions, such as the Display PostScript present in Sun's X11/NeWS, do. If you're willing to commit yourself to such a platform, you may be able to use one of them. I don't know whether DEC has such support available or not.) It is possible to draw the text into a pixmap, read it back into an image, rotate the image yourself, and send it back to the server for display. This will work but it's a rather ugly kludge and will probably turn out to be excessively slow. It is also very difficult to cleanly rotate a pixel-based image by other than multiples of 90 degrees. [%] It does not support 180-degree rotation; the reason for my phrasing it this way is that there *is* support for right-to-left languages like Arabic (though not vertical languages like Chinese). > 2. How to sense the mouse clicks nad get X Y coordinate points? Speaking at the protocol level, you want ButtonPress events (and possibly ButtonRelease and/or MotionNotify events as well). The Xlib level provides much the same view of things; if you're using a toolkit or widget set things get more complicated (and I can't help). der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu