Clipper.Inflate (gb.clipper)
Static Function Inflate ( Polygons As Polygon[], Delta As Float [ , Join As Integer, Cap As Integer, Limit As Float, Outline As Boolean ] ) As Polygon[]
Expand or shrink closed polygons, or inflate opened polylines.
-
Polygons : The list of polygons to process.
-
Delta : Amount of pixels added or substracted.
With closed paths (polygons), a positive value specifies how much outer polygon contours will expand and how much inner "hole" contours will contract (and the converse with negative values).
With open paths (polylines), specifies the width of the inflated line.
-
Join : How to join lines:
-
Clipper.JoinBevel : Bevelled joins are similar to squared joins except that squaring won't occur at a fixed distance. While bevelled joins may not be as pretty as squared joins, bevelling is much easier (i.e. faster) than squaring. And perhaps this is why bevelling rather than squaring is preferred in numerous graphics display formats (including SVG and PDF document formats).
-
Clipper.JoinMiter : Edges are first offset a specified distance away from and parallel to their original (i.e. starting) edge positions. These offset edges are then extended to points where they intersect with adjacent edge offsets. However a limit must be imposed on how far mitered vertices can be from their original positions to avoid very convex joins producing unreasonably long and narrow spikes). To avoid unsightly spikes, joins will be
squared
wherever distances between original vertices and their calculated offsets exceeds a specified value (expressed as a ratio relative to the offset distance).
-
Clipper.JoinRound : Rounding is applied to all convex joins with the arc radius being the offset distance, and the original join vertex the arc center.
-
Clipper.JoinSquare : Convex joins will be truncated using a
squaring
edge. And the mid-points of these squaring edges will be exactly the offset distance away from their original (or starting) vertices.
-
Cap : How to inflate an opened path:
-
Limit : Cutting distance for JoinMiter and JoinSquare.
-
Outline : If closed paths must be processed as if they were open paths.
See also