CRect:PtInside 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 )

bullet.gif    CRect2 is another CRect.

bullet.gif    This method returns true of CRect2 is inside the current CRect.

bullet.gif    Otherwise, false is returned.

Example

The following script tests whether CRect R2 is inside CRect R:

 

R = new_rect(200,250,250,500)

-- create a CRect object

R2 = new_rect(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 class, PtInside, PtInsideInt


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