Re: XForms: Date: Sun, 12 Mar 2000 08:40:21 -0800

From: MAYLEN Y SIMON (maylenysimon@cantv.net)
Date: Thu Mar 16 2000 - 08:32:18 EST

  • Next message: Robert Day: "XForms: Input"

    # To subscribers of the xforms list from "MAYLEN Y SIMON" <maylenysimon@cantv.net> :

    Zhao:
    yes, If I comment out add_text the image is displayed correctly, with no
    error. Moreover, If I add text and dump the image to A PS before
    flimage_display, the PS image includes the text.

    Thanks; SO
    ----- Original Message -----
    From: T.C. Zhao <tc_zhao@yahoo.com>
    To: <xforms@bob.usuhs.mil>
    Sent: Thursday, March 16, 2000 9:14 PM
    Subject: Re: XForms: Date: Sun, 12 Mar 2000 08:40:21 -0800

    > # To subscribers of the xforms list from "T.C. Zhao" <tc_zhao@yahoo.com> :
    >
    >
    > Can't see obvious errors from the code below except
    > that you should not be setting image->display_type, which
    > is not meant to be used by the application. One of these
    > days, I'll make an opaque structure to hold all of these
    > internal variables.
    >
    > If punting setting image->display_type does not help,
    > try to comment out the add_text() and postscript dump and
    > see if it displays correctly.
    >
    > --- MAYLEN Y SIMON <maylenysimon@cantv.net> wrote:
    > > # To subscribers of the xforms list from "MAYLEN Y SIMON"
    > > <maylenysimon@cantv.net> :
    > >
    > > Steve:
    > > Here is part of the code:
    > >
    > > image = flimage_alloc();
    > > image->type = FL_IMAGE_CI;
    > > image->w =820 ;
    > > image->wx = 0 ;
    > > image->h =660;
    > > image->wy =0;
    > > image->map_len= 250+2;
    > > image->tran_index = 1;
    > > image->tran_rgb = 1;
    > > image->app_background = 1;
    > > image->display_type = 1;
    > > flimage_getmem(image);
    > > text_color = 0
    > > bg_color = 0
    > >
    > > /* Reads lookup table from file /usr/X11R6/lib/X11/rgb.txt */
    > > First: Fill image
    > > for (row = 0; row < image->h; row++)
    > >
    > >
    > > for (col = 0; col < image->w; col++)
    > > image->ci[row][col] = data[row][col] ;
    > > }
    > > Fiill lookup table:
    > > for(i=2; i< image->map_len; i++)
    > > {
    > > image->red_lut[i] = r;
    > > image->green_lut[i]=g;
    > > image->blue_lut[i]=b;
    > > }
    > >
    > > Then: Add text
    > > flimage_add_text(image, title_string, strlen(title_string),
    > > FL_ITALIC_STYLE, FL_LARGE_SIZE, text_color,
    > > bg_color, FALSE, (double)(wpx/2-
    > > strlen(title_string)),
    > > (double)(yminpx - 25),0);
    > >
    > > before displaying this image on a canvas dumpe it to a ps file with
    > > text and
    > > everything.
    > >
    > >
    > > The Image is created; displayed for a second and then chashes giving
    > > this
    > > message:
    > >
    > >
    > > ######################################################
    > >
    > > X Error of failed request: BadColor (invalid Colormap parameter)
    > > Major opcode of failed request: 88 (X_FreeColors)
    > > Resource id in failed request: 0x0
    > > Serial number of failed request: 141386
    > > Current serial number in output stream: 141388
    > >
    > > ######################################################
    > >
    > > .
    > > ----- Original Message -----
    > > From: Steve Lamont <spl@szechuan.ucsd.edu>
    > > To: <xforms@bob.usuhs.mil>
    > > Sent: Monday, March 13, 2000 5:26 PM
    > > Subject: Re: XForms: Date: Sun, 12 Mar 2000 08:40:21 -0800
    > >
    > >
    > > > # To subscribers of the xforms list from spl@szechuan.ucsd.edu
    > > (Steve
    > > Lamont) :
    > > >
    > > > > Can somebody help me..? I've got this error when I try to put
    > > some text
    > > > > on an image I am creating ...?
    > > >
    > > > I think we need more information than that. Can you supply example
    > > > code which exhibits the behavior?
    > > >
    > > > 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/
    > > >
    > >
    > > _________________________________________________
    > > 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/
    > >
    > >
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Talk to your friends online with Yahoo! Messenger.
    > http://im.yahoo.com
    > _________________________________________________
    > 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/
    >

    _________________________________________________
    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 17 2000 - 16:50:49 EST