Allocating and using colours...
- From: "David J. Singer" <doc deadvirgins org uk>
- To: gtk-list gnome org
- Subject: Allocating and using colours...
- Date: Thu, 20 May 2004 22:08:40 +0100
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 deadvirgins org uk
"Time flies like an arrow, fruit flies like a banana"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]