CPolygon:CalcRect
The CalcCenter method calculates the bounding rectangle containing the vertices of the CPolygon.
R = CPolygon:CalcRect() where |
R is a CRect object containing the bounding rectangle of the polygon.
The following script creates a CPolygon from 2 arrays and calculates its bounding rectangle:
|
-- create CPolygon A |
|
-- result: R = [4:7,-3:5] |