Saturday, September 11, 2004

 

Hit Testing for Lines and Curves

1.
Win32: Hit Testing Lines and Curves
Dennis Crain
Microsoft Developer Network Technology Group

Created: February 8, 1994
From http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngdi/html/msdn_hittest2.asp

"What Is Hit Testing?
To the user, the act of hit testing in a graphical user interface seems natural. The pointing device's cursor is placed over an object, and the user initiates an action to "hit" the object. Most often this pointing device is a mouse, and the action is a mouse click.

Within the context of this article, let's agree that hit testing is the process of determining if the user has selected a line or a curve by means of a mouse click. I will describe three methods for selecting these objects. Two methods are general in that they do not rely on any of the functionality of Win32. The third method combines the line hit-testing method with a new feature of Win32, paths.

Many programmers know hit testing as "picking," the term used in many textbooks on graphics and in many graphics languages. For example, you pick a line segment on the screen and move it to another location."

2.
Connectors and Cables
Dennis Crain
Microsoft Developer Network Technology Group

May 1995

From http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnargdi/html/msdn_cables.asp

3.
GDI+ Line/Curve Drawing and Hit Test
By Husni Che Ngah

Demo application for developing a drawing application using GDI+. Featuring line/curve draw, hit test, and implementation of CObject/CObArray classes.

http://www.codeproject.com/vcpp/gdiplus/HitTester.asp

4.
Graph Marker with Hit-Testing
By Wenfei Wu February 11, 1999

http://www.codeguru.com/Cpp/misc/misc/graphics/article.php/c379/



<< Home

This page is powered by Blogger. Isn't yours?