2014-05-23 06:26:46 +04:00
|
|
|
#pragma once
|
2013-10-31 08:45:00 +04:00
|
|
|
|
2013-11-25 09:28:26 +04:00
|
|
|
#include "polyclipping/clipper.hpp"
|
2013-10-31 08:45:00 +04:00
|
|
|
#include "Polygon2d.h"
|
|
|
|
|
|
|
|
namespace ClipperUtils {
|
|
|
|
|
2014-06-26 23:32:52 +04:00
|
|
|
static const unsigned int CLIPPER_SCALE = 1 << 16;
|
2013-10-31 08:45:00 +04:00
|
|
|
|
2013-12-26 20:09:46 +04:00
|
|
|
ClipperLib::Path fromOutline2d(const Outline2d &poly, bool keep_orientation);
|
2013-12-19 09:19:34 +04:00
|
|
|
ClipperLib::Paths fromPolygon2d(const Polygon2d &poly);
|
2013-12-27 08:05:11 +04:00
|
|
|
ClipperLib::PolyTree sanitize(const ClipperLib::Paths &paths);
|
2013-12-25 01:49:49 +04:00
|
|
|
Polygon2d *sanitize(const Polygon2d &poly);
|
2013-12-27 08:05:11 +04:00
|
|
|
Polygon2d *toPolygon2d(const ClipperLib::PolyTree &poly);
|
2013-12-19 09:19:34 +04:00
|
|
|
ClipperLib::Paths process(const ClipperLib::Paths &polygons,
|
|
|
|
ClipperLib::ClipType, ClipperLib::PolyFillType);
|
2014-02-24 00:51:11 +04:00
|
|
|
Polygon2d *applyOffset(const Polygon2d& poly, double offset, ClipperLib::JoinType joinType, double miter_limit, double arc_tolerance);
|
2014-01-19 21:27:11 +04:00
|
|
|
Polygon2d *applyMinkowski(const std::vector<const Polygon2d*> &polygons);
|
2013-12-27 08:05:11 +04:00
|
|
|
Polygon2d *apply(const std::vector<const Polygon2d*> &polygons, ClipperLib::ClipType);
|
|
|
|
Polygon2d *apply(const std::vector<ClipperLib::Paths> &pathsvector, ClipperLib::ClipType);
|
2013-10-31 08:45:00 +04:00
|
|
|
};
|