CImageView:GetCursorRect


The GetCursorRect method returns the extent of the image cursor for the current image in the CImageView. This function returns the rectangle limits in pixel coordinates. If the current image has a World Coordinate Calibration ("WCS"), then the pixel coordinates may be converted to world coordinates using CImage:XyToWcs or CImage:XyToWcsStr.

Syntax

CRect = CImageView:GetCursorRect()

bullet.gif    This returns a CRect containing the xmin, xmax, ymin, and ymax values in pixel coordinates.

bullet.gif    On success, this method returns a new CRect object.

bullet.gif    On failure, this method returns nil.

Example

Assume that a CImageView object named V exists and refers to an image window. The following script sets the image cursor to an x-range of 100:200 and a y-range of 300:500:

R = V:GetCursorRect()

-- retrieve the image cursor

Printf("%lg:%lg, %lg:%lg", R:Get() )

-- print the image cursor limits.

Related Topics

CImageView, CRect class, SetCursorRect, SetCursorExtent, CRect class, Image Coordinate System, Subpixel Coordinate Definition

 

Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.