offset static method
- required Geometry geometry,
- required double distance,
- required GeometryOffsetType offsetType,
- required double bevelRatio,
- required double flattenError,
Creates an offset version of the input geometry.
The offset operation creates a geometry that is a constant distance from the input geometry. It is similar to buffering, but produces a one-sided result. If distance > 0, then the offset geometry is constructed to the right of the input geometry, otherwise it is constructed to the left. For a simple polygon, the orientation of outer rings is clockwise and for inner rings it is counterclockwise. So the "right side" of a simple polygon is always its inside. The bevelRatio is multiplied by the offset distance and the result determines how far a mitered offset intersection can be from the input curve before it is beveled.
Supports true curves as input, producing a densified curve as output where applicable.
Parameters:
geometry— A geometry object.distance— The offset distance for the new geometry.offsetType— The offset type the resulting geometry.bevelRatio— The ratio used to produce a bevel join instead of a miter join (used only when the offset type is Miter).flattenError— The maximum distance of the resulting segments compared to the true circular arc (used only when the offset type if round). This is not a guaranteed upper limit if too many additional vertices and segments would be required.
Return Value: The offset geometry object.