clipper.hpp | clipper.hpp | |||
---|---|---|---|---|
/************************************************************************** ***** | /************************************************************************** ***** | |||
* * | * * | |||
* Author : Angus Johnson * | * Author : Angus Johnson * | |||
* Version : 4.8.5 | * Version : 4.8.6 | |||
* | * | |||
* Date : 15 July 2012 | * Date : 11 August 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 82 | skipping to change at line 82 | |||
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); | double delta, JoinType jointype = jtSquare, double MiterLimit = 2); | |||
void SimplifyPolygon(const Polygon &in_poly, Polygons &out_polys); | void SimplifyPolygon(const Polygon &in_poly, Polygons &out_polys, PolyFillT | |||
void SimplifyPolygons(const Polygons &in_polys, Polygons &out_polys); | ype fillType = pftEvenOdd); | |||
void SimplifyPolygons(Polygons &polys); | void SimplifyPolygons(const Polygons &in_polys, Polygons &out_polys, PolyFi | |||
llType fillType = pftEvenOdd); | ||||
void SimplifyPolygons(Polygons &polys, PolyFillType fillType = pftEvenOdd); | ||||
void ReversePoints(Polygon& p); | void ReversePolygon(Polygon& p); | |||
void ReversePoints(Polygons& p); | void ReversePolygons(Polygons& p); | |||
//used internally ... | //used internally ... | |||
enum EdgeSide { esNeither = 0, esLeft = 1, esRight = 2, esBoth = 3 }; | enum EdgeSide { esNeither = 0, esLeft = 1, esRight = 2, esBoth = 3 }; | |||
enum IntersectProtects { ipNone = 0, ipLeft = 1, ipRight = 2, ipBoth = 3 }; | enum IntersectProtects { ipNone = 0, ipLeft = 1, ipRight = 2, ipBoth = 3 }; | |||
struct TEdge { | struct TEdge { | |||
long64 xbot; | long64 xbot; | |||
long64 ybot; | long64 ybot; | |||
long64 xcurr; | long64 xcurr; | |||
long64 ycurr; | long64 ycurr; | |||
End of changes. 3 change blocks. | ||||
9 lines changed or deleted | 11 lines changed or added | |||