[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Absolutely silly question ...



I'm using a GdkPixmap as double buffer for drawing in to a DrawingArea.
I can set the background color for the drawing area, and then I create a

new gc from DrawingArea->window.

After this I create a pixmap with that gc, but ... It doesn't get the
background
color ... Why ???

How can I set the background color of a Pixmap ???

Fragment of code of configure event callback :

    ...

    GdkColor Color;

    Color.red = 0;
    Color.green = 20000;
    Color.blue = 65000;

    gdk_color_alloc (gdk_window_get_colormap (DrawingArea->window),
&Color);

    gdk_window_set_background (DrawingArea->window, &Color);

    gc = gdk_gc_new( DrawingArea->window );

    gdk_gc_set_background( gc, &Color );

    BackPixmap = gdk_pixmap_new(DrawingArea->window,
                          DrawingArea->allocation.width,
                          DrawingArea->allocation.height,
                          -1);

    gdk_draw_pixmap( BackPixmap,
                     gc,
                     DrawingArea->window,
                     0,0,0,0,
                     DrawingArea->allocation.width,
                     DrawingArea->allocation.height );

     ....




Thank you very much and sorry for this so ( I think ) question ...






--


              Carlos "Nyman" Novo
              Sainsel, Sistemas Navales
              S.A.
 [Image]      Manuel Velasco Pando 7
              Sevilla

              Tfno: 95-4936508






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]