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

From: MAYLEN Y SIMON (maylenysimon@cantv.net)
Date: Mon Mar 13 2000 - 10:00:23 EST

  • Next message: Steve Lamont: "Re: XForms: Date: Sun, 12 Mar 2000 08:40:21 -0800"

    # 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/



    This archive was generated by hypermail 2b29 : Tue Mar 14 2000 - 18:19:45 EST