CRect:SetToImage


The SetToImage method initializes the CRect to a full image. This is an old method which is replaced by Set.

Syntax

CRect:SetToImage( CImage )

where

    CImage is the CImage object whose dimensions will be used.

  

This method initializes the CRect to the column and row dimensions of the image. This makes the values extend from 1 to CImage:Cols and 1 to CImage:Rows. The xmax member holds the number of image columns and the ymax member holds the number of image rows.

Example

Assume a CImage I exists. The following script initializes the CRect to the size of the image:

R = NewRect()

-- create a CRect object

R:SetToImage( I )

-- specify the CImage

Related Topics

Set

CRect class