Benjamin Jessup wrote:0 > Thanks for the help. When I am done refactoring the code for the > HitTest(), I will apply the same changes to my MouseOver() method > (posted below - This one is much uglier).
Thanks -- no time to look at this now. > As far as speed goes I can not yet tell a difference between these > methods and the original color Hitmap. that would depend in how many objects you're dealing with. the color method is order(1), so it's just as fast regardless of how many object there are -- it may make a difference for a lot of objects. But then it does slow down rendering. But the key is that a BB test is just that. It's easy, so fairly fast, but it doesn't tell you if you've hit a non-rectangular object, or only the outline, or ... To do all that, you'd need to do additional testing after the BB check. That may be the way to go -- I never really tested it. The only place I think performance could be an issue is with mouse_move events, these come fast! If we really want to do this, some more refactoring might be in order -- doing the BB-check, then figuring out the Z order seems kind of ugly. Perhaps an ordered list of hit-able objects should be generated -- or a list of indexes into the draw_lists... > I will also put together a small demo for the > FloatCanvas.EditableTextBox() but it required some additional methods to > be added to FloatCanvas.ScaledTextBox() but I think I can just overwrite > the ScaledTextBox class with the methods I added so as to comply with > the original FC installation. great, I look forward to seeing that! -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://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
