CRect:PtInsideInt CRect:Round

CRect:RectInside


The RectInside method tests whether another CRect is interior to the current CRect object. The tests are made using <= or >= so that an identical rectangle boundary is considered to be inside. To be "inside", the other rectangle must have xmin and ymin >= current values and xmax and ymax <= current values.

Syntax

bSuccess = CRect:RectInside( CRect2 )

Example

The following script fragment tests whether CRectR2 is inside CRect R:

 

R = CRect:new(200,250,250,500)

-- create a CRect object

R2 = CRect:new(200,225,225,400)

-- a rectangle with ymin outside R

test = R:RectInside(R2)

-- returns true or false

Printf( "Inside= %d\n", test)

-- result: Inside = 0 (false)

Related Topics

CRect, PtInside, PtInsideInt