←Select platform

GetItemViewBounds Method

Summary

Current physical (in control pixel coordinates) bounds of any part of an item.

Syntax

C#
VB
C++
public virtual LeadRectD GetItemViewBounds( 
   ImageViewerItem item, 
   ImageViewerItemPart part, 
   bool clipped 
) 
Public Overridable Function GetItemViewBounds( 
   ByVal item As ImageViewerItem, 
   ByVal part As ImageViewerItemPart, 
   ByVal clipped As Boolean 
) As LeadRectD 
public:  
   virtual LeadRectD^ GetItemViewBounds( 
      ImageViewerItem^ item, 
      ImageViewerItemPart^ part, 
      bool clipped 
   ) 

Parameters

item

The item. Must be a valid item inside this viewer.

part

The item part requested.

clipped

true to return the bounding rectangle intersected with the current viewer control area, otherwise; false.

Return Value

The bounding rectangle in pixels or LeadRectD.Empty if the item is not visible, does not have an image or outside the clipping area.

Remarks

Use ConvertBoundsToView to convert a bound from logical to physical coordinates.

For more information refer to Image Viewer Appearance, Image Viewer Transformation, and Image Viewer Bounds and Transform.

Example

This example will show how to use GetItemBounds to perform manual hit-testing on the item.

Start with the ImageViewer example, remove all the code inside the example function (search for the "// TODO: add example code here" comment) and insert the following code:

Requirements

Target Platforms

Help Version 19.0.2017.10.19
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls.WinForms Assembly