muppet <scott asofyet org> writes:
In my experience, you don't try to take that kind of knowledge of the background; either do the plain XOR or expect to clear and redraw the background.
I suppose it's a bit old school, but in the right circumstances it's portable and fast. At any rate could Gtk2::Gdk::Color->new take an optional pixel value per below? (I thought about a couple of words for the docs there, or even just the comments, but I suspect it's better to leave the obscurities of what fields are used when to Gtk and X.) Some setter funcs too could let you re-use a color object I guess, for doing things in a loop, but making a new one each time probably isn't terribly expensive.
Attachment:
GdkColor.xs.diff
Description: Text Data