LEADTOOLS JavaScript (Leadtools.Controls)
LEAD Technologies, Inc

ConvertRect Method


The source coordinate type.
The destination coordinate type.
The rectangle to be converted.
Converts the specified rectangle from one CoordinateType to another.
Syntax
 function Leadtools.Controls.ImageViewer.convertRect( 
   sourceType ,
   destinationType ,
   rect 
)
!MISSING Scrap '_RTJavaScript_Method_SYNTAX'!

Parameters

ParameterTypeDescription
sourceTypeCoordinateTypeThe source coordinate type.
destinationTypeCoordinateTypeThe destination coordinate type.
rectLeadRectDThe rectangle to be converted.

Return Value

TypeDescription
LeadRectD The converted rectangle, in the destination coordinate type.
Remarks

Use this method to convert a rect value from control to image coordinates or back. This method will simply multiply the rectangle value by the transformation matrix (Transform) when converting from image to control coordinates and by the inverse of this matrix when converting from control to image coordinate.

If sourceType has the same value as destinationType, then this method will return a value equal to rect.

Example

For an example, refer to ImageViewerRubberBandInteractiveMode.

See Also

Reference

ImageViewer Object
ImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.