Error processing SSI file
LEADTOOLS JavaScript (Leadtools.Controls)

ConvertPoints Method

Show in webframe
The reference item. This value can be null.
Original coordinates of points.
Desired target coordinates.
Array of points to convert.
Converts an array of LeadPointD from one coordinates to the other.
Syntax
 function Leadtools.Controls.ImageViewer.convertPoints( 
   item ,
   fromType ,
   toType ,
   points 
)

Parameters

ParameterTypeDescription
itemImageViewerItemThe reference item. This value can be null.
fromTypeImageViewerCoordinateTypeOriginal coordinates of points.
toTypeImageViewerCoordinateTypeDesired target coordinates.
pointsLeadPointDArray of points to convert.
Remarks

Use ConvertPoint to convert a single point and ConvertPoints to convert an array of points at once. The viewer needs to create temporary matrices for the conversion, so if you have multiple points, convert them all at once for optimal performance.

Use ConvertRect to convert a rectangle.

The values of item, fromType and toType controls how the point is converted as described below. If the conversion uses an item and the value of item is null, then the viewer will use ActiveItem to support point conversion in a single-view mode.

fromType toType item Description
ImageViewerCoordinateType.Control ImageViewerCoordinateType.View Not used Converts a point from control coordinates such as a mouse event in relation to the view
ImageViewerCoordinateType.View ImageViewerCoordinateType.Control Not used Converts a point from view coordinates to control. The reverse of the previous operation
ImageViewerCoordinateType.Control ImageViewerCoordinateType.Item Used Converts a point from control coordinates such as a mouse event in relation to the whole of the item
ImageViewerCoordinateType.Item ImageViewerCoordinateType.Control Used Converts a point from item to control. The reverse of the previous operation
ImageViewerCoordinateType.Control ImageViewerCoordinateType.Content Used Converts a point from control coordinates such as a mouse event in relation to the content area of the item
ImageViewerCoordinateType.Content ImageViewerCoordinateType.Control Used Converts a point from content to control. The reverse of the previous operation
ImageViewerCoordinateType.Control ImageViewerCoordinateType.Image Used Converts a point from control coordinates such as a mouse event in relation to the image of the item
ImageViewerCoordinateType.Image ImageViewerCoordinateType.Control Used Converts a point from image to control. The reverse of the previous operation
ImageViewerCoordinateType.Control ImageViewerCoordinateType.Floater Used Converts a point from control coordinates such as a mouse event in relation to the floater image of the item
ImageViewerCoordinateType.Floater ImageViewerCoordinateType.Control Used Converts a point from image floater to control. The reverse of the previous operation

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

Example

For an example, refer to ConvertPoint.

See Also

Reference

ImageViewer Object
ImageViewer Members

Error processing SSI file