KiCad PCB EDA Suite
polygons_defs.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2012-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2012-2014 KiCad Developers, see CHANGELOG.TXT for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 /*
26  * file polygons_defs.h
27  * definitions to use boost::polygon in KiCad.
28  */
29 
30 #ifndef _POLYGONS_DEFS_H_
31 #define _POLYGONS_DEFS_H_
32 
33 #include <boost/polygon/polygon.hpp>
34 
35 // Define some types used here from boost::polygon
36 namespace bpl = boost::polygon; // bpl = boost polygon library
37 using namespace bpl::operators; // +, -, =, ...
38 
39 // Definitions needed by boost::polygon
40 typedef int coordinate_type;
41 
49 typedef bpl::polygon_data<int> KI_POLYGON;
50 
60 typedef std::vector<KI_POLYGON> KI_POLYGON_SET;
61 
66 typedef bpl::point_data<int> KI_POLY_POINT;
67 
75 typedef bpl::polygon_with_holes_data<int> KI_POLYGON_WITH_HOLES;
76 
86 typedef std::vector<KI_POLYGON_WITH_HOLES> KI_POLYGON_WITH_HOLES_SET;
87 
88 
89 #endif // #ifndef _POLYGONS_DEFS_H_
int coordinate_type
Definition: polygons_defs.h:40
bpl::polygon_with_holes_data< int > KI_POLYGON_WITH_HOLES
KI_POLYGON_WITH_HOLES defines a single polygon with holes When holes are created in a KI_POLYGON_WITH...
Definition: polygons_defs.h:75
std::vector< KI_POLYGON_WITH_HOLES > KI_POLYGON_WITH_HOLES_SET
KI_POLYGON_WITH_HOLES_SET defines a set of KI_POLYGON_WITH_HOLES.
Definition: polygons_defs.h:86
std::vector< KI_POLYGON > KI_POLYGON_SET
KI_POLYGON_SET defines a set of single KI_POLYGON.
Definition: polygons_defs.h:60
bpl::polygon_data< int > KI_POLYGON
KI_POLYGON defines a single polygon ( boost::polygon_data type.
Definition: polygons_defs.h:49
bpl::point_data< int > KI_POLY_POINT
KI_POLY_POINT defines a point for boost::polygon.
Definition: polygons_defs.h:66