Re: XForms: fl_image & pixmap

From: Steve Lamont (spl@szechuan.ucsd.edu)
Date: Fri Mar 03 2000 - 11:30:31 EST

  • Next message: T.C. Zhao: "Re: XForms: fl_image & pixmap"

    # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

    > another question about convertion from FL_IMAGE to Pixmap using
    > fl_create_from_pixmapdata()...
    >
    > The second argument of fl_create_from_pixmapdata() is a char ** . How
    > can i convert the FL_IMAGE data in char ** ?

    Whoops. My mistake.

    fl_create_from_pixmapdata() expects XPM Pixmap data (see, I said this
    lack of clear nomenclature was confusing), not raw pixels.

    What you'll need to do is to take the FL_IMAGE data and create an
    XImage using XCreateImage(), create an X Pixmap with XCreatePixmap(),
    and then use XPutImage() to write the image data to the X Pixmap.

    It's been a while since I've dealt with raw Pixmaps -- I generally use
    OpenGL or Mesa to deal with my images these days.

                                                            spl
    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    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 - 11:34:53 EST