CPolygon:Shift
The Shift method shifts the CPolygon by applying an offset to each of its vertices.
CPolygon:Shift( nShiftX, nShiftY ) where |
nShiftX, nShiftY are the offsets for the x and y directions.
The following script creates a CPolygon from 2 arrays and applies a shift of (3.5, -2.1):
|
-- create CPolygon A |
|
-- result: x,y = 6, -3 |
|
-- scale the polygon |
|
-- result: x,y = 9.5, -5.1 |