XWD Display in label

XWD Display in label

Post by eric.c.ram » Thu, 31 Mar 2005 04:30:01


So, for my first ever Motif task, I've been assigned to write a Motif
program which will display a .xwd to the screen, among other things.
I've taken the advice from the FAQ, liberated bits of code from xwud,
and in general made it as best as I can.

More specifically, I took the code from xwud to read the .xwd into an
XImage structure, with minor alterations to befit the fact that all the
images I'm showing are ZPixmap 1024x940 8-bit color images. From
there, the following code is what I've used.

------------------------
gc = XtGetGC(widget,0,NULL);
pixmap = XCreatePixmap(dpy,XtWindow(widget), in_image->width,
in_image->height, in_image->depth);
if (pixmap==XmUNSPECIFIED_PIXMAP)
{/* Unrelated error-checking code*/}
XPutImage(dpy,pixmap,gc,in_image,0,0,0,0,in_image->width,
in_image->height);
XtVaSetValues(widget, XmNlabelPixmap, pixmap, NULL);
------------------------

With this code, the image does not display. The closest I've come so
far is a black box of the appropriate size with a little bit of color
information on one side of it. Can anyone think of anything I may have
missed that could help me solve this issue?
 
 
 

1. Some snap-ins not displaying in "Restricted/Permitted snap-ins"

2. Display bubble chart labels instead of legend "series" label(s)

on,

I read your answers to Richard and I think I need to follow your solution,
however, I am plotting an array of data with three series and four categories
(X, Y and size values for each). In all, 12 bubbles. I want each of my
bubbles to display the category name (just like Richard's question, I think)
but I'm not completely sure from reading your answer that your macro would
work in my case. To make matters worse, I'm really a complete macro novice.
Any advice?

very sincerely,
Gretchen Gordon - FedEx Latin America, Marketing Analysis


I read this discussion thread

"Jon Peltier" wrote:

3. Display bubble chart labels instead of legend "series" label(s

4. Row labels displayed as column labels

5. User labels aircraft labels don't display in FSX

6. Custom Labels WITHOUT add-ins?

7. Display result from Simulink (Display Block) to GUI's label continuously.

8. What is "Text Display"? Text Display vs. Label

9. "xwd" equivalent that doesn't make the window freeze up for a bit?

10. DefaultKeyBindings Lesstif/Mwm and xwd

11. What does this xwd message mean?

12. xwd hangs on Indigo-2 Solid Impact running IRIX 5.3

13. make a video from xwd output

14. Is it possible to get the xwd file by typing some commands?

15. xwd