Hi Paul,
(cc-d to the floatcanvas list -- a good place for this discussion)

> Sorry for bothering you like this, but can you tell me what I need to do 
> to fix the attached error getting reported in one of my production apps?
> 
> Do all my users need to have 24-bit color?

well, maybe. Take a look in the floatcanvas list archives for details:

http://mail.mithis.com/pipermail/floatcanvas/2006-July/000044.html

However, the issues may have changed.

The short version is that the way FloatCanvas does hit-testing is to 
draw each object in a unique color to an off  screen bitmap, then, by 
checking the color of the pixel where the mouse event occurs, it knows 
what object is under the mouse. However, the color selection code 
assumes 24 bit (or better). I had tried to make it 16 bit compatible, 
but a user was having problems with that, so I put in that exception.

I did have an idea for a work-around, but the user at hand just switched 
to 24 bit -- 16 bit displays are pretty rare these days.

So, three options:

1) use a 24 bit display

2) add the work around I had in mind -- see the  note in the mailing 
list for details -- and surrounding notes.

3) recent versions of wx may support creating a MemoryDC that is not the 
same bit-depth as the display -- this was not the case when I first 
wrote that code (wx 2.4.*), but I think it may be now, so you could make 
sure that it uses 24 bits off-screen.

Sorry, I don't really have time to hack on this now, I'm working on:

http://www.incidentnews.gov/incident/7708

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to