GeometryOffsetPolyline2d Method |
Inflates or deflates polyline by delta units (pixels), producing polygons. If delta is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If delta is negative, returns an empty array.
Each polygon's vertices will be rounded as determined by join_type, see GeometryPolyJoinType.
Each polygon's endpoints will be rounded as determined by end_type, see GeometryPolyEndType.
The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling IsPolygonClockwise(Vector2).
Namespace: Godot
public static Array OffsetPolyline2d( Vector2[] polyline, float delta, GeometryPolyJoinType joinType = GeometryPolyJoinType.Square, GeometryPolyEndType endType = GeometryPolyEndType.Square )
[Missing <param name="polyline"/> documentation for "M:Godot.Geometry.OffsetPolyline2d(Godot.Vector2[],System.Single,Godot.Geometry.PolyJoinType,Godot.Geometry.PolyEndType)"]
[Missing <param name="delta"/> documentation for "M:Godot.Geometry.OffsetPolyline2d(Godot.Vector2[],System.Single,Godot.Geometry.PolyJoinType,Godot.Geometry.PolyEndType)"]
[Missing <param name="joinType"/> documentation for "M:Godot.Geometry.OffsetPolyline2d(Godot.Vector2[],System.Single,Godot.Geometry.PolyJoinType,Godot.Geometry.PolyEndType)"]
[Missing <param name="endType"/> documentation for "M:Godot.Geometry.OffsetPolyline2d(Godot.Vector2[],System.Single,Godot.Geometry.PolyJoinType,Godot.Geometry.PolyEndType)"]
[Missing <returns> documentation for "M:Godot.Geometry.OffsetPolyline2d(Godot.Vector2[],System.Single,Godot.Geometry.PolyJoinType,Godot.Geometry.PolyEndType)"]