[gtk-list] needs advice in gdkpixmap.c




  The more I look at this part of the code, the less I understand it.
Why do we set the foreground color of the gc to copy in image in a
pixmap?
  Usually, the back/foreground colors are not used when copying images/
pixmaps to pixmaps/windows (note that they have the same depth).

So if someone could tell me why the function call is here...


  pixmap = gdk_pixmap_new (window, width, height, visual->depth);
  gc = gdk_gc_new (pixmap);
  gdk_gc_set_foreground (gc, transparent_color);
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  gdk_draw_image (pixmap, gc, image, 0, 0, 0, 0, image->width, image->height);
  gdk_gc_destroy (gc);
  gdk_image_destroy (image);


The call also use the transparent color. Strange as not all the pixmaps
do have a transparent color...

Patrice.



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