Repository navigation
InflatePaths
Seth Hillbrand edited this page Oct 29, 2026
·
2 revisions
Home › clipper.h › InflatePaths
Paths64 InflatePaths(const Paths64& paths, double delta,
JoinType join_type, EndType end_type,
double miter_limit = 2.0, double arc_tolerance = 0.0);
PathsD InflatePaths(const PathsD& paths, double delta,
JoinType join_type, EndType end_type, double miter_limit = 2.0,
int precision = 2, double arc_tolerance = 0.0);These functions encapsulate most of the features of ClipperOffset, the class that performs both polygon and open path offsetting. (And it's important to understand the notes pertaining to offsetting too.)
| Parameter | Explanation |
|---|---|
| paths | A Paths64 or PathsD object that is to undergo offsetting. |
| delta | The amount paths are to be offset. |
| joinType | See JoinType. |
| endType | See EndType. |
| miterLimit | See ClipperOffset.MiterLimit. |
| precision | The number of decimal places of precision to consider when paths is type PathsD. (Maximum is 8 decimal places) |
| arcTolerance | See ClipperOffset.ArcTolerance. |
#include "clipper2/clipper.h"
...
using namespace Clipper2Lib;
int main()
{
PathsD polyline, solution;
polyline.push_back(MakePathD({100,100, 1500,100, 100,1500, 1500,1500}));
// offset polyline
solution = InflatePaths(polyline, 200, JoinType::Miter, EndType::Square);
//draw polyline and inflated solution
}#include "clipper2/clipper.h"
...
using namespace Clipper2Lib;
int main()
{
PathsD polygon, solution;
// add outer polygon contour
polygon.push_back(Ellipse(RectD(100, 100, 1500, 1500)));
// add inner "hole" contour
PathD p = Ellipse(RectD(400, 400, 1200, 1200));
std::reverse(p.begin(), p.end());
polygon.push_back(p);
// offset polygon
solution = InflatePaths(polygon, 100, JoinType::Round, EndType::Polygon);
//draw polygon and inflated solution
}ClipperOffset, ClipperOffset.ArcTolerance, ClipperOffset.MiterLimit, EndType, JoinType, Paths64, PathsD
Copyright © 2010-2025 Angus Johnson. Clipper2 is distributed under the Boost Software License.
Headers
- clipper.h
- clipper.core.h
- clipper.engine.h
- clipper.export.h
- clipper.minkowski.h
- clipper.offset.h
- clipper.rectclip.h
- clipper.triangulation.h
Classes
Data types and structure definitions
- ClipType
- EndType
- FillRule
- JoinType
- Path64
- PathD
- Paths64
- PathsD
- Point64
- PointD
- PointInPolygonResult
- Rect64
- RectD
- TriangulateResult
- ZCallback64
- ZCallbackD
Static Functions
- Area
- BooleanOp
- Difference
- InflatePaths
- Intersect
- IsPositive
- MakePath
- MinkowskiDiff
- MinkowskiSum
- PointInPolygon
- PolyTreeToPaths64
- PolyTreeToPathsD
- RectClip
- RectClipLines
- ReversePath
- SimplifyPaths
- TranslatePath
- Triangulate
- TrimCollinear
- Union
- XOR
Topics