Re: XForms: flickering images

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 14 Apr 99 17:48:38 PDT

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

> FL_OBJECT *img;
> Pixmap p;
>
> /* create and fill Pixmap with image to be shown */
>
> fl_free_pixmap_pixmap(img);
> fl_set_pixmap_pixmap(img, p, 0);
>
> The images are 320x240. Is there a limit on the number pixels that can be
> drawn between refreshes with set_pixmap (due to xserver overhead, etc)?

What you may want to do is to use a Canvas object for your image
display rather than a Pixmap object.

What I'd do is use the background_pixmap Window attribute.
Schematically, it would look like

static Pixmap old_pixmap = 0;
Pixmap new_pixmap = create_your_pixmap();

XSetWindowBackgroundPixmap( fl_get_display(), FL_ObjWin( canvas ),
new_pixmap );

if ( old_pixmap )
XFreePixmap( fl_get_display(), old_pixmap );
old_pixmap = new_pixmap;

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://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/