Polygon:getLineOffset
From GiderosMobile
Available since: Gideros 2015.03.22
Class: Clipper
Description
Offsets an open polyline (a polygon treated as an open path) by delta units, producing one or more parallel polylines.
(table) = Polygon:getLineOffset(delta,joinType,endType,limit)
Parameters
delta: (number) offset distance in units
joinType: (number, optional, default = Polygon.JOINT_SQUARE) one of JOINT_SQUARE, JOINT_ROUND, JOINT_MITER
endType: (number, optional, default = Polygon.END_SQUARE) one of END_CLOSED, END_BUTT, END_SQUARE, END_ROUND
limit: (number, optional, default = 0) miter limit
Return values
Returns (table) array of Polygon objects (1 indexed), each one an offset polyline
Example
local lines = poly:getLineOffset(6, Polygon.JOINT_ROUND, Polygon.END_ROUND, 2)