GDI+ HitTest too slow
- From: Jonas Hochfelder <hochfelderj2000@xxxxxx>
- Date: Fri, 11 Jul 2008 15:57:51 +0200
Hello,
I am drawing some paths on a form, which shall be highlighted on the MouseOver event.
Normally I would use some PointInRect function because it's the fastest, but the problem is that my GDI+ paths are not always rectangles. GDI+ has some hit test functions like the GdipIsVisiblePathPoint function, but - at least on my computer - use incredibly much CPU. If I move the mouse over the form and call this function on every mouse move, my CPU consumption goes up to ~60%, and I'm only trying it with a single path...
I had a look at Mahjong.exe on my Vista laptop, and I was so surprised that there is about 2% CPU consumption when I move the mouse around. I am totally confused why. Is it because they only hittest rectangles?
Could you give me a hint how I should go on?
Thank you very much.
Jonas Hochfelder
.
- Prev by Date: RE: ReadPrint Failure. How to use it properly
- Next by Date: StrokeAndFillPath vs. StrokePath and FillPath called seperately
- Previous by thread: Sending keyboard inputs to combobox
- Next by thread: StrokeAndFillPath vs. StrokePath and FillPath called seperately
- Index(es):
Loading