Repository navigation
ClipperOffset Execute
Seth Hillbrand edited this page Oct 29, 2026
·
2 revisions
Home › clipper.offset.h › ClipperOffset › ClipperOffset.Execute
void Execute(double delta, Paths64& paths);
void Execute(double delta, PolyTree64& polytree);With closed paths (polygons), a positive delta specifies how much outer polygon contours will expand and how much inner "hole" contours will contract (and the converse with negative deltas).
With open paths (polylines) including EndType::Joined, delta specifies the width of the inflated line.
Execute can also be called multiple times (using different deltas).
#include "clipper2/clipper.h"
...
using namespace Clipper2Lib;
int main()
{
Paths64 subjects, solution;
subjects.push_back(MakePath({100,100, 1500,100, 100,1500, 1500,1500}));
ClipperOffset co;
co.AddPaths(subjects, JoinType::Miter, EndType::Square);
co.Execute(200, solution);
//draw polyline and inflated solution
}#include "clipper2/clipper.h"
...
using namespace Clipper2Lib;
int main()
{
Paths64 subjects, solution;
// add outer polygon contour
subjects.push_back(Ellipse(Rect64(100, 100, 1500, 1500)));
// add inner "hole" contour (note reversed orientation)
subjects.push_back(Ellipse(Rect64(400, 400, 1200, 1200)));
std::reverse(subjects[0].begin(), subjects[0].end());
ClipperOffset co;
co.AddPaths(subjects, JoinType::Round, EndType::Polygon);
co.Execute(100, solution);
//draw polygon and inflated solution
}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