2013-10-31 08:45:00 +04:00
|
|
|
#ifndef CLIPPER_UTILS_H_
|
|
|
|
#define CLIPPER_UTILS_H_
|
|
|
|
|
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 {
|
|
|
|
|
|
|
|
static const unsigned int CLIPPER_SCALE = 100000;
|
|
|
|
|
2013-12-19 09:19:34 +04:00
|
|
|
ClipperLib::Path fromOutline2d(const Outline2d &poly);
|
|
|
|
ClipperLib::Paths fromPolygon2d(const Polygon2d &poly);
|
2013-12-25 01:49:49 +04:00
|
|
|
ClipperLib::Paths sanitize(const ClipperLib::Paths &paths);
|
|
|
|
Polygon2d *sanitize(const Polygon2d &poly);
|
2013-12-19 09:19:34 +04:00
|
|
|
Polygon2d *toPolygon2d(const ClipperLib::Path &poly);
|
|
|
|
Polygon2d *toPolygon2d(const ClipperLib::Paths &poly);
|
|
|
|
ClipperLib::Paths process(const ClipperLib::Paths &polygons,
|
|
|
|
ClipperLib::ClipType, ClipperLib::PolyFillType);
|
2013-10-31 08:45:00 +04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|