Code

- Clean up LPE bounding box computing code
[inkscape.git] / src / live_effects / lpegroupbbox.h
1 #ifndef INKSCAPE_LPEGROUPBBOX_H
2 #define INKSCAPE_LPEGROUPBBOX_H
4 /*
5  * Inkscape::LivePathEffect_group_bbox
6  *
7  * Copyright (C) Steren Giannini 2008 <steren.giannini@gmail.com>
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
11 #include "live_effects/effect.h"
12 #include "live_effects/parameter/path.h"
13 #include "live_effects/parameter/enum.h"
14 #include "live_effects/parameter/bool.h"
16 #include <2geom/sbasis.h>
17 #include <2geom/sbasis-geometric.h>
18 #include <2geom/bezier-to-sbasis.h>
19 #include <2geom/sbasis-to-bezier.h>
20 #include <2geom/d2.h>
21 #include <2geom/piecewise.h>
23 namespace Inkscape {
24 namespace LivePathEffect {
26 class GroupBBoxEffect {
27 protected:
28 //if we need information concerning the group Bounding box and coordinates of each subshapes.
29     Geom::Interval boundingbox_X;
30     Geom::Interval boundingbox_Y;
32 //This set boundingbox_X and boundingbox_Y
33     void original_bbox(SPLPEItem *lpeitem);
35 //Here is a recursive function to calculate the bbox of a group
36     void recursive_original_bbox(SPGroup *group, Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2, std::vector<Geom::Path> & temppath);
40 };
42 }; //namespace LivePathEffect
43 }; //namespace Inkscape
45 #endif