CRect:PtInsideInt
The PtInsideInt method tests whether a point is interior to the CRect when the coordinates are all considered to be integers rather than real numbers.
bSuccess = CRect:IsInsideInt( x, y )
RemarksThis method handles the boundary case in which the point lies within the same integer value. For example, if xmin = 200.4, then any point x in the range 200 through 201 is considered to lie on the boundary xmin and is therefore considered inside the rectangle. |
The following script fragment tests whether the point (225.2,300.6) is inside the CRect when tested using both PtInside() and PtInsideInt():
|
-- create a CRect object |
|
|
|
|
|
-- returns true or false |
|
-- result: Inside = 0 |
|
-- returns test = true or false |
|
-- result: Inside = 1 |