findNearestItem Method

Summary

Gets the item nearest to the specified physical (in viewer pixel) coordinates.

Syntax
TypeScript
JavaScript
ImageViewer.prototype.findNearestItem = function( 
   point 
) 
findNearestItem( 
   point: LeadPointD 
): ImageViewerItem; 

Parameters

point

The point in physical (in viewer pixel) coordinates.

Return Value

The item nearest to the point or null if the image viewer has no items.

Remarks

This method will first call HitTestItem and returns any item that is directly under the point. If this fails, then it will return the item that has its center nearest to the point.

Requirements

Target Platforms

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

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