Allocating and using colours...

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

 



According to the manuals, there seems to be a number of different ways
of defining and using colours and graphics contexts and I'd appreciate 
some guidance as to the "best" way to do this.

Back in Gtk 1.2 I used to do something like:
 
   GdkColor color_red = {0, 65535, 0, 0 };
   ...
      gdk_color_alloc(gdk_colormap_get_system(), &color_red);
      gc_values.foreground = color_red;
      gc = gdk_gc_new_with_values( pixmap, &gc_values, GDK_GC_FOREGROUND );

which worked fine, was quick and easy, but always struck me as a bit of a hack. 
Is is OK?  How should I be doing this...


-- 
David J. Singer
doc@xxxxxxxxxxxxxxxxxx
"Time flies like an arrow, fruit flies like a banana"

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux