Skip to content

Commit

Permalink
Major rewrite of clipper.export.h
Browse files Browse the repository at this point in the history
and also renamed a couple of exported functions.
Delphi DLL sample app updated too
  • Loading branch information
AngusJohnson committed Oct 24, 2023
1 parent 0b5bf2f commit 9ffd077
Show file tree
Hide file tree
Showing 7 changed files with 674 additions and 964 deletions.
11 changes: 10 additions & 1 deletion CPP/Clipper2Lib/include/clipper2/clipper.engine.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*******************************************************************************
* Author : Angus Johnson *
* Date : 1 October 2023 *
* Date : 24 October 2023 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2010-2023 *
* Purpose : This is the main polygon clipping module *
Expand Down Expand Up @@ -416,6 +416,7 @@ namespace Clipper2Lib {

void SetScale(double value) { scale_ = value; }
double Scale() { return scale_; }

PolyPathD* AddChild(const Path64& path) override
{
int error_code = 0;
Expand All @@ -425,6 +426,14 @@ namespace Clipper2Lib {
return result;
}

PolyPathD* AddChild(const PathD& path)
{
auto p = std::make_unique<PolyPathD>(this);
PolyPathD* result = childs_.emplace_back(std::move(p)).get();
result->polygon_ = path;
return result;
}

void Clear() override
{
childs_.resize(0);
Expand Down
Loading

0 comments on commit 9ffd077

Please sign in to comment.