Display text vertically

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

3 posts / 0 new
Last post
Display text vertically

Hello all,
I'll go ahead and admit that I am a newcomer to the Motif world, and appreciate any help. I have recently been working on a Scatter Plot widget for a work project, and I am trying to design a method of displaying the y-axis label vertically on the left side of the scatter plot. I have looked into both using a label separate from the pixmap, as well as drawing text on the pixmap itself. The problem is I cannot seem to find any way to set the orientation so that it prints vertically. The closest thing I found was related to the XDrawString functions, though I gathered that the vertical orientation only applied to certain languages in which text is displayed vertically.
I'd appreciate even a point in the right direction, whether it involves possibly rotating a label, printing text vertically on a pixmap, or some other way I haven't run into yet.
Thanks,
Kieran
‹ screen flicker problem when moving graphics Odd behaviour of XmComboBox.... (arrow problem) ›

 

 

The most cost-effective way is not to create your own widget in the first place;there are many commercial plotting packages available, such as Xrt/Graph, Xdt, Epak/Pro, etc. they've already spent the thousands of manhours needed to make a robust plotting package.

If you really want to re-invent the wheel, there is no "simple" way in Motif to draw rotated text. You have to draw it normally in a pixmap, then perform a rotation on the pixmap, then use XCopyArea to copy the rotated pixmap to your image.
--
Fred K

     

     

    Thanks Fred.

    I did look into a few plotting packages, but there are a couple reasons I decided to go my own way in this (including the government's extensive process to introduce any sort of new api/package into their software). Using XCopyArea sounds like just the method I was looking for so I'll mess around with that. Thanks again!

    -Kieran