hitTest Method

Summary

Queries the specified location to determine if a test point is over the thumb or the polygon.

Syntax
TypeScript
JavaScript
PanoramicPolygon.prototype.hitTest = function( 
   item, 
   x, 
   y 
) 
hitTest( 
   item: ImageViewerItem, 
   x: number, 
   y: number 
): boolean; 

Parameters

item

The item where the hit test is being performed.

x

The x-coordinate in question.

y

The y-coordinate in question.

Return Value

true if the (x, y) coordinates are on the drawable item. false, otherwise.

Remarks

The results are stored in 2 properties:

  • The first property is HitTestIndex and contains the index of the polygon line / polygon point.

  • The second property is HitTestResult and contains the polygon (x,y) coordinates that are hitting on any part.

Requirements

Target Platforms

Help Version 23.0.2024.5.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls.Medical Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.