Re: setting Gtk2::Gdk::Color pixel



muppet <scott asofyet org> writes:

XOR is useful for reversible drawing.  I swear, the white+xor trick
works.

Yes, I believe it, it gives contrasting colours on a truecolour (except
backgrounds near say 0x7F7F7F) and even on a pseudocolour it may well
contrast depending what colours are in what pixels.

I just wrote the attached script, and used it to create the
attached screenshot.

That's about where I'm at too :).  I've even got in mind collecting it
up as a kind of add-on you can ask to have on a chosen widget, setting
events on the nearest windowed parent etc.  I've actually got three
things I want, a lasso, a horizontal line following the mouse as a
visual aid, and dragging some actual display elements around -- so maybe
there's a general start/draw/draw/stop pattern to be collected up even.

But like I say I've got in mind flipping between particular colours, so
as to maybe get orange lasso on white background, or red on grey or
something like that, having some knowledge of the background colour.  So
for that I'd like to explicitly set the pixel field value in a
Gtk2::Gdk::Color to go in the GC, if that could be possible ... somehow
...


Back in the olden days, fancy alpha compositing and such was simply
too expensive for interactive operations like rubber-band selection.

Yes, that's about my level, I don't really know anything about what
people do with partial transparency and whatnot these days.  It seems
like a great way to slow down your computer and stop 8-bit screens
working :).



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