summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpegroupbbox.h
blob: bf1fa09027dcd6f78cd34048fdf82f2fb2a19225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef INKSCAPE_LPEGROUPBBOX_H
#define INKSCAPE_LPEGROUPBBOX_H

/*
 * Inkscape::LivePathEffect_group_bbox
 *
 * Copyright (C) Steren Giannini 2008 <steren.giannini@gmail.com>
 *
 * Released under GNU GPL, read the file 'COPYING' for more information
 */
#include "live_effects/effect.h"
#include "live_effects/parameter/path.h"
#include "live_effects/parameter/enum.h"
#include "live_effects/parameter/bool.h"

#include <2geom/sbasis.h>
#include <2geom/sbasis-geometric.h>
#include <2geom/bezier-to-sbasis.h>
#include <2geom/sbasis-to-bezier.h>
#include <2geom/d2.h>
#include <2geom/piecewise.h>

namespace Inkscape {
namespace LivePathEffect {

class GroupBBoxEffect {
protected:
//if we need information concerning the group Bounding box and coordinates of each subshapes.
    Geom::Interval boundingbox_X;
    Geom::Interval boundingbox_Y;

//This set boundingbox_X and boundingbox_Y
    void original_bbox(SPLPEItem *lpeitem);

//Here is a recursive function to calculate the bbox of a group
    void recursive_original_bbox(SPGroup *group, Geom::Piecewise<Geom::D2<Geom::SBasis> > & pwd2, std::vector<Geom::Path> & temppath);



};

}; //namespace LivePathEffect
}; //namespace Inkscape

#endif