CRect:Get CRect:SetToImage

CRect:Set


The Set method initializes the 4 properties of the CRect to specific values.

Syntax

CRect:Set( xmin, xmax, ymin, ymax )

CRect:Set( CRect )

CRect:Set( CImage )

Example

The following script initializes the 4 dimensions of the CRect to xmin=100, xmax=200, ymin=40.5, ymax=300.25. Note the order in which the values are passed, with both x values first, followed by both y values:

R = CRect:new()

-- create a CRect object

R:Set(100,200,40.5,300.25)

-- specify the values

 

Related Topics

CRect, SetToImage, Get, Image Coordinate System, Subpixel Coordinate Definition