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.
bSuccess = CRect:RectInside( CRect2 ) |
where
CRect2 is another CRect.
bSuccess is returned true if CRect2 is inside the current rectangle, otherwise false.
The following script tests whether CRect R2 is inside CRect R:
|
-- create a CRect object |
|
-- a rectangle with ymin outside R |
|
-- returns true or false |
|
-- result: Inside = 0 (false) |