Christopher Barker wrote:
> Christopher Barker wrote:
>>> Are you saying I'll be able to follow the code and figure out how to
>>> enable HitTest for a color depth of 16?
>>
>> I think the solution is for the color generator to actually draw the
>> color to a small bitmap, then check the pixel color, and see what it
>> comes back as -- then store that color as the index for the hot-test.
>> Or maybe it would be easier to test if the color comes back the same,
>> and reject it if it doesn't, then no other code would have to change.
>
> Paul,
>
> Enclosed is a test file that may help. It should be in FloatCnvas SVN,
> in the Tests dir, but just in case, here it is.
>
> I can't fix it here, as wx doesn't seem to support creating a bitmap in
> a different depth than the native one, and I don't' have any 16 bit
> systems.
Unfortunately on Linux I'm getting a segfault with that test on the last line
in the
following block:
53 print "Bitmap depth is:", B.GetDepth()
54 pdata = wx.AlphaPixelData(B)
55 pacc = pdata.GetPixels()
56 pacc.MoveTo(pdata, i,j)
57 outColor = pacc.Get()[:3]
It does seem to run fine on Mac, though.
Paul
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas