Re: XForms: canvas demo

From: Steve Lamont (spl@szechuan.ucsd.edu)
Date: Tue Mar 07 2000 - 13:32:06 EST

  • Next message: zaphodb: "Re: XForms: canvas demo"

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

    > I have the events printed in a browser (like in the canvas demo
    > program) to check what is going on and first 31 expose events are
    > printed before the first enter / leave event is printed
    > i.e. reaction to the enter leave is noticable (I change the color of
    > an object on enter and revert to its original on leaving the
    > canvas). It takes exactly the time until the last is printed before
    > the canvasses react the first time. If I switch to another desktop
    > and switch back again this is repeated.

    Hm. As I said, the demo works okay for me -- both with the client
    local to the server and over a network connection.

    There is going to be a certain amount of delay as the expose events
    are serviced -- perhaps a considerable amount, depending upon what
    kind of graphics are being pushed at the Canvases.

    What are you drawing in the Canvases? Images or some form of vector
    graphics? It may be that you are pushing too many pixels at the server
    per each Expose event handled or are doing too much in your service
    routines.

    If the graphics do not change all that often in the Canvases you might
    want to write your images to Pixmaps (X Pixmaps, not XForms Pixmap
    objects or XPM Pixmaps) and then use XSetWindowBackgroundPixmap() to
    write them to the Canvas Window. Then the images will live on the
    server side of the connection and be redraw automagically whenever an
    Expose event is generated, saving your application the trouble.

    Refer to your favorite X reference for details on the use of
    XSetWindowBackgroundPixmap().

                                                            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 : Tue Mar 07 2000 - 13:35:37 EST