hitTest Method

Summary

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

Syntax
TypeScript
JavaScript
CutLines.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 two properties:

  • The first property is HitTestIndex and contains the index of the cut-line.

  • The second property is HitTestResult and it contains the part that is being clicked on, such as the body, line, center handle, etc.

Requirements

Target Platforms

Help Version 22.0.2023.2.14
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.