Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!cs.umn.edu!brsmith From: brsmith@cs.umn.edu (Brian R. Smith) Newsgroups: comp.windows.x Subject: Re: rotated text Message-ID: <1991Mar22.182146.22225@cs.umn.edu> Date: 22 Mar 91 18:21:46 GMT References: <9103220518.AA05516@lightning.McRCIM.McGill.EDU> Organization: University of Minnesota, Minneapolis, CSci dept. Lines: 29 In <9103220518.AA05516@lightning.McRCIM.McGill.EDU> mouse@lightning.mcrcim.mcgill.EDU (der Mouse) writes: >> We are looking for pointers, hints or code that will allow us to put >> up text in a window that isn't horizontal. >[It's the text that's to be non-horizontal, not the window.] >From the FAQ: >---------------------------------------------------------------------- >Subject: 110) How do I render rotated text? > > Xlib intentionally does not provide such sophisticated >graphics capabilities, leaving them up to server-extensions or >clients-side graphics libraries. Your only choice, if you want >to stay within the core X protocol, is to render the text into a >pixmap, read it back via XGetImage(), rotate it "by hand" with >whatever matrices you want, and put it back to the server via >XPutImage(); more specifically: On a related note: InterViews (C++ UI toolkit, in the X contrib software) has support for rendering rotated fonts in X. It could be one source of example code. (With the caveat that it is a somewhat large and complex piece of software to go dredging through for that one specific piece of information.) -- Brian