Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ConvertLogicalToObjectRectangle Method
See Also 
Leadtools.Annotations Namespace > AnnObject Class : ConvertLogicalToObjectRectangle Method



rect
A rectangle in logical coordinates.
rect
A rectangle in logical coordinates.
Converts a rectangle from logical to object coordinates.

Syntax

Visual Basic (Declaration) 
Public Function ConvertLogicalToObjectRectangle( _
   ByVal rect As AnnRectangle _
) As AnnRectangle
Visual Basic (Usage)Copy Code
Dim instance As AnnObject
Dim rect As AnnRectangle
Dim value As AnnRectangle
 
value = instance.ConvertLogicalToObjectRectangle(rect)
C# 
public AnnRectangle ConvertLogicalToObjectRectangle( 
   AnnRectangle rect
)
C++/CLI 
public:
AnnRectangle ConvertLogicalToObjectRectangle( 
   AnnRectangle rect
) 

Parameters

rect
A rectangle in logical coordinates.

Return Value

A rectangle representing the original rectangle but in object coordinates.

Example

For an example, refer to ConvertLogicalToObjectPoints.

Remarks

An AnnObject may contain various points, lines, curves and rectangles that denote the object coordinates and where it should be drawn on an image. Also, the AnnObject contains a Matrix object that may be updated with a transformation when the object is moved, rotated or sized. This transformation as well as the container's own transformation are used to translate an object point to image coordinates and then to the screen.

The coordinates stored in the object (for example, AnnLineObject.StartPoint or AnnRectangleObject.Bounds are called object coordinates. These coordinates do not translate 1 to 1 to pixel values on the image used in the annotations because of the transformation matrices involved.

The values corresponding to the object coordinates in pixels are called logical coordinates. For example, a logical coordinate of AnnLineObject.StartPoint is its pixel value (in top left-position) in the image it is annotating. Converting from object to logical coordinates is what happens when you call the AnnAutomation.Realize method.

To manipulate an object's position and size manually from outside the annotation framework, you need to first convert its coordinates to logical values, perform your own transformations, convert them back to object coordinates before setting them back to the object.

To convert a point or a group of points from object to logical coordinates, use the ConvertObjectToLogicalPoints method.

To convert a point or a group of points from logical to object coordinates, use the ConvertLogicalToObjectPoints method.

To convert a rectangle from object to logical coordinates, use the ConvertObjectToLogicalRectangle method.

To convert a rectangle from logical to object coordinates, use the ConvertLogicalToObjectRectangle method.

For an example on converting object to logical coordinates, refer to ConvertObjectToLogicalPoints.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features