setting Gtk2::Gdk::Color pixel
- From: Kevin Ryde <user42 zip com au>
- To: gtk-perl-list gnome org
- Subject: setting Gtk2::Gdk::Color pixel
- Date: Fri, 16 Nov 2007 11:11:14 +1100
I had an urge to do some xor-ing of pixels, to flip between colours for
easy un-drawing of an interactive "lasso" in a widget, so I want to set
the "foreground" pixel of a GC to a calculated value (as opposed to
getting it from a colour lookup or alloc).
If I'm not mistaken $gc->set_values and friends take a Gtk2::Gdk::Color
object in the hash for "GdkGCValues", but I couldn't spot how to set the
pixel field in such an object. Is there a secret setter method, or a
way to create with a given pixel? (I see Gtk2::Gdk::Color->new takes
the RGB fields, but not a pixel.)
(Of course why GdkGCValues etc uses a GdkColor struct when it only looks
at the pixel value is anyone's guess. Must have seemed like a good idea
at the time.)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]