# To subscribers of the xforms list from email@example.com (Steve Lamont) :
> 1 - I would like to display an fl_image in a pixmap, What 's the best
> way to do this ?
I assume you mean a Pixmap object. Use fl_create_from_pixmapdata() to
convert the FL_IMAGE data into a Pixmap and then feed that Pixmap to
the object with fl_set_pixmap_pixmap().
> 2 - I would like to create an fl_image from a pixmap...
This is somewhat ambiguous, since there are several things called a
Pixmap in the XForms world -- first there's the XForms Pixmap object
(aka Pixmap Class). Then there's an X Pixmap, which is an object
which lives on the X server and is displayed and manipulated by the
server. Finally, there's a data format called XPM, which stands for
(you guessed it) X Pixmap. Oy vey!
Let's take this step by step, if we can.
To fetch the X Pixmap from the XForms Pixmap object, use the function
fl_get_pixmap_pixmap(). That hands you the ID of the X Pixmap that is
on the server which is attached to the XForms Pixmap object.
To fetch the image information from that X Pixmap, we need to resort
to some raw Xlib, but not much. Use the function XGetImage() to pull
the image data back from the X server. The Drawable argument will be
your X Pixmap returned by fl_get_pixmap_pixmap(). XGetImage() returns
you an XImage structure.
Now, to convert that to an XPM Pixmap, take the XImage data handed to
you by XGetImage(), stuff it into an FL_IMAGE structure, and feed that
The details of handling colormap information, if it exists, are left
to the user as an exercise, since there are far too many different
variations to go into here. The first volume of the O'Reilly X
series, _Xlib Programming Manual_, is a good place to start.
As always, refer to the XForms manual for parameters of the XForms
function calls and their use.
> 3 - How can i display an animated gif (i tried with fl_image_display &&
> fl_image_sdisplay whithout success ...)
I'm not sure that's supported. TC?
To unsubscribe, send the message "unsubscribe" to
firstname.lastname@example.org or see
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Fri Mar 03 2000 - 09:57:33 EST