CRect:SetToImage


The SetToImage method initializes the CRect to a full image. Then Xmax returns the number of image columns and Ymax returns the number of image rows..

Syntax

CRect:SetToImage( CImage )

bullet.gif    CImage is the image whose dimensions will be used.

Remarks

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.

Example

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

R = new_rect()

-- create a CRect object

R:SetToImage( I )

-- specify the CImage

Related Topics

CRect class, Set


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