clipper.hpp | clipper.hpp | |||
---|---|---|---|---|
/************************************************************************** ***** | /************************************************************************** ***** | |||
* * | * * | |||
* Author : Angus Johnson * | * Author : Angus Johnson * | |||
* Version : 4.10.0 | * Version : 5.0.1 | |||
* | * | |||
* Date : 25 December 2012 | * Date : 30 December 2012 | |||
* | * | |||
* Website : http://www.angusj.com * | * Website : http://www.angusj.com * | |||
* Copyright : Angus Johnson 2010-2012 * | * Copyright : Angus Johnson 2010-2012 * | |||
* * | * * | |||
* License: * | * License: * | |||
* Use, modification & distribution is subject to Boost Software License Ver 1. * | * Use, modification & distribution is subject to Boost Software License Ver 1. * | |||
* http://www.boost.org/LICENSE_1_0.txt * | * http://www.boost.org/LICENSE_1_0.txt * | |||
* * | * * | |||
* Attributions: * | * Attributions: * | |||
* The code in this library is an extension of Bala Vatti's clipping algorit hm: * | * The code in this library is an extension of Bala Vatti's clipping algorit hm: * | |||
* "A generic solution to polygon clipping" * | * "A generic solution to polygon clipping" * | |||
skipping to change at line 81 | skipping to change at line 81 | |||
Polygon outer; | Polygon outer; | |||
Polygons holes; | Polygons holes; | |||
}; | }; | |||
typedef std::vector< ExPolygon > ExPolygons; | typedef std::vector< ExPolygon > ExPolygons; | |||
enum JoinType { jtSquare, jtRound, jtMiter }; | enum JoinType { jtSquare, jtRound, jtMiter }; | |||
bool Orientation(const Polygon &poly); | bool Orientation(const Polygon &poly); | |||
double Area(const Polygon &poly); | double Area(const Polygon &poly); | |||
void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys, | void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys, | |||
double delta, JoinType jointype = jtSquare, double MiterLimit = 2, bool C heckInputs = true); | double delta, JoinType jointype = jtSquare, double MiterLimit = 2, bool A utoFix = true); | |||
void SimplifyPolygon(const Polygon &in_poly, Polygons &out_polys, PolyFillT ype fillType = pftEvenOdd); | void SimplifyPolygon(const Polygon &in_poly, Polygons &out_polys, PolyFillT ype fillType = pftEvenOdd); | |||
void SimplifyPolygons(const Polygons &in_polys, Polygons &out_polys, PolyFi llType fillType = pftEvenOdd); | void SimplifyPolygons(const Polygons &in_polys, Polygons &out_polys, PolyFi llType fillType = pftEvenOdd); | |||
void SimplifyPolygons(Polygons &polys, PolyFillType fillType = pftEvenOdd); | void SimplifyPolygons(Polygons &polys, PolyFillType fillType = pftEvenOdd); | |||
void ReversePolygon(Polygon& p); | void ReversePolygon(Polygon& p); | |||
void ReversePolygons(Polygons& p); | void ReversePolygons(Polygons& p); | |||
//used internally ... | //used internally ... | |||
enum EdgeSide { esLeft = 1, esRight = 2}; | enum EdgeSide { esLeft = 1, esRight = 2}; | |||
enum IntersectProtects { ipNone = 0, ipLeft = 1, ipRight = 2, ipBoth = 3 }; | enum IntersectProtects { ipNone = 0, ipLeft = 1, ipRight = 2, ipBoth = 3 }; | |||
End of changes. 2 change blocks. | ||||
5 lines changed or deleted | 5 lines changed or added | |||