Visibility against an unknown background

Sergei Organov osv at javad.com
Tue Oct 24 12:50:58 EDT 2006


Fredrik Lundh <fredrik at pythonware.com> writes:
> Sergei Organov wrote:
>
>> There is a better way to do it. Check if the toolkit has line drawing
>> mode that XORs the line color with the background, then draw using this
>> mode and white color of the line.
>
> which means that the selection looks like crap most of the time,

The selection? What selection? Did the OP or me talk about selection?

> and doesn't work at all on medium gray or b/w dithered patterns.

Yes, every method has its pros and cons, but XOR is probably most
efficient.

> for most cases, "marching ants" is a much better approach (usually done 
> by drawing alternating stippled patterns).  see e.g.

Where "most cases" depends on application. I'd be very upset to see,
say, 5-6 highly intersecting scientific plots on the same picture drawn
using the "marching ants" approach.

Besides, the marching ants doesn't work for printing :(

-- Sergei.




More information about the Python-list mailing list