[comp.windows.x.motif] XmStringDraw/Pixmap Problem

gerolima@wdl1.wdl.fac.com (Mark K Gerolimatos) (09/08/90)

	ALL I WANT TO DO IS TO DRAW A (Xm) COMPOUND STRING INTO A PIXMAP.
	WHY IS THERE NO XmWay TO DO THIS? Let me at 'em, c'mon! Let me at 'em!

	If you know of a way to do this that is not ugly, please let me know.
	-Krudbahr

	gerolima@wdl34.wdl.fac.com

carl@quad1.quad.com (Carl Priddy) (09/09/90)

> 	ALL I WANT TO DO IS TO DRAW A (Xm) COMPOUND STRING INTO A PIXMAP.
> 	WHY IS THERE NO XmWay TO DO THIS? Let me at 'em, c'mon! Let me at 'em!
> 
Hmmm...there isn't a direct way, but you CAN use the XmString() functions
to retrieve segments, and then use XDrawImageString() (or something like
it) to draw to the pixmap. I didn't try XmStringDraw with a pixmap instead of
window, since the syntax would have said "drawable" if that were possible. 
The one instance that you can count on the documentation being accurate is
when it is telling you you CAN'T do something that it would seem you SHOULD
be able to. I certainly understand your frustration. Apparently,
the dictionaries at OSF either don't contain the word, "convenience", or
have a radically different definition. Their idea of a "convenience function",
is anything but. I'd add a ":-", but this is unfortunately too true.
Good luck,
carl.

argv@turnpike.Eng.Sun.COM (Dan Heller) (09/10/90)

In article <14893@gouda.quad.com> carl@quad1.quad.com (Carl Priddy) writes:
> > 	ALL I WANT TO DO IS TO DRAW A (Xm) COMPOUND STRING INTO A PIXMAP.
> > 	WHY IS THERE NO XmWay TO DO THIS? Let me at 'em, c'mon! Let me at 'em!
>  I didn't try XmStringDraw with a pixmap instead of
> window, since the syntax would have said "drawable" if that were possible. 
Upon investigation of the code, it appears that this is treated as a
drawable and it could therefore be a pixmap.  I haven't tried it yet
either (bigger fires to put out).  Can someone try this and summarize
to the net?  Perhaps someone from OSF could make some kind of comment
of the form:

    1) you must use a window because ...
    2) you don't *have* to use a window in the current implementation,
	but we can't support pixmaps in an upcoming release [because...]
    3) you're right -- it doesn't -have- to be a window.
    4) XmStringDraw()?

--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.