CImageView:GetCursorRect


The GetCursorRect method returns the extent of the image cursor in the CImageView. This function returns the rectangle limits in pixel coordinates.

Syntax

CRect = CImageView:GetCursorRect()

where

    CRect is a CRect object that describes the cursor rectangle.

    On success, this method returns a new CRect object. On failure, nil. is returned.

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 )

-- print the image cursor limits.

Related Topics

SetCursorRect

SetCursorExtent

CImageView class

CRect class

Image Coordinate System

Subpixel Coordinate Definition