21 #ifndef _DRAWINGTOOLS_H
22 #define _DRAWINGTOOLS_H
25 #include <tulip/Node.h>
26 #include <tulip/Edge.h>
27 #include <tulip/Coord.h>
28 #include <tulip/BoundingBox.h>
32 template<
class itType >
39 class BooleanProperty;
47 TLP_SCOPE BoundingBox computeBoundingBox(
const Graph *graph,
48 const LayoutProperty *layout,
49 const SizeProperty *size,
50 const DoubleProperty *rotation,
51 const BooleanProperty *selection = NULL);
61 TLP_SCOPE BoundingBox computeBoundingBox(Iterator<node> *itN,
63 const LayoutProperty *layout,
64 const SizeProperty *size,
65 const DoubleProperty *rotation,
66 const BooleanProperty *selection = NULL);
82 TLP_SCOPE std::pair<Coord, Coord> computeBoundingRadius (
const Graph *graph,
83 const LayoutProperty *layout,
84 const SizeProperty *size,
85 const DoubleProperty *rotation,
86 const BooleanProperty *selection = NULL);
98 TLP_SCOPE std::vector<Coord> computeConvexHull (
const Graph *graph,
99 const LayoutProperty *layout,
100 const SizeProperty *size,
101 const DoubleProperty *rotation,
102 const BooleanProperty *selection = NULL);
114 TLP_SCOPE std::vector<Coord> computeConvexHull(
const std::vector<tlp::Coord> &points);
124 TLP_SCOPE
bool computeLinesIntersection(
const std::pair<tlp::Coord, tlp::Coord> &line1,
125 const std::pair<tlp::Coord, tlp::Coord> &line2,
126 tlp::Coord &intersectionPoint);
135 TLP_SCOPE tlp::Coord computePolygonCentroid(
const std::vector<tlp::Coord> &points);