Revision: 4651
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4651&view=rev
Author:   hofman
Date:     2008-09-17 12:57:21 +0000 (Wed, 17 Sep 2008)

Log Message:
-----------
Use line width for hittest of ink notes with a minimum of 8.

Modified Paths:
--------------
    trunk/PDFAnnotationInk_SKExtensions.m

Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m       2008-09-17 12:51:29 UTC (rev 
4650)
+++ trunk/PDFAnnotationInk_SKExtensions.m       2008-09-17 12:57:21 UTC (rev 
4651)
@@ -93,6 +93,7 @@
 
 - (BOOL)hitTest:(NSPoint)point {
     NSPoint relPoint = SKSubstractPoints(point, [self bounds].origin);
+    float delta = fmaxf(4.0, 0.5 * [self lineWidth]);
     
     if ([super hitTest:point]) {
         NSEnumerator *pathEnum = [[self paths] objectEnumerator];
@@ -107,7 +108,7 @@
                 element = [path elementAtIndex:i associatedPoints:points];
                 prevPoint = nextPoint;
                 nextPoint = element == NSCurveToBezierPathElement ? points[2] 
: points[0];
-                if (i > 0 && SKPointNearLineFromPointToPoint(relPoint, 
prevPoint, nextPoint, 4.0))
+                if (i > 0 && SKPointNearLineFromPointToPoint(relPoint, 
prevPoint, nextPoint, delta))
                     return YES;
             }
         }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to