.NET Framework Bookmark and Share   
 index > Windows Presentation Foundation (WPF) > Hitdetection with WPF (on Ink in InkCanvas)
 

Hitdetection with WPF (on Ink in InkCanvas)

Everyone has played Linerider [1], I want to create something similarbut with WPF

I'm workingwith theInkCanvas and i want to knowwhat built in functions that kan help me in my development.I know that you can iterate through all Strokes and their StylusPoints and then use good old fasion polygon-hitdetection butwhat i want toknow is ifthere are any built in functions for this so i don't have to re-invent the wheel?

And if not, what else in WPF can i use to simpify hit-detection(simple bool isn't enough, i need the normals and that stuff for good looking bounces). I've looked a bit on the Vector-class and it seems to contain alot of usefull functions like the dotproduct, are there more usefull controlls or classes like that?

[1]http://www.linerider.org/

Chimme

There are two classes that provide hit-test functionality for ink:

System.Windows.Ink.IncrementalLassoHitTester & System.Windows.Ink.IncrementalStrokeHitTester

They are designed to enable stroke erasing and selection scenarios, though. They won't give you the normals, so it's not exactly what you are looking for.

Thanks, Stefan Wick

Stefan Wick - MSFT

You can use google to search for other answers

Custom Search

More Threads

• How to excute the control's command when the control hasn't the focus
• Why is WPF Checkbox looking ugly when checked ?
• Help.. displaying a messagebox or window on DataTable update causes exception
• Positioning the IME popup when typing on a Canvas
• how to persist data in xbap
• GridSplitters and Grid
• Default Control Template not working for a user defined control
• Listview scroll positon
• detect properties for a passed uicontrol
• ToolTip Routed Events Problem