1 #define INKSCAPE_LPEGROUPBBOX_CPP
3 /*
4 * Copyright (C) Steren Giannini 2008 <steren.giannini@gmail.com>
5 *
6 * Released under GNU GPL, read the file 'COPYING' for more information
7 */
9 #include "live_effects/lpegroupbbox.h"
11 #include "sp-item.h"
13 namespace Inkscape {
14 namespace LivePathEffect {
16 void
17 GroupBBoxEffect::original_bbox(SPLPEItem *lpeitem, bool absolute)
18 {
19 // Get item bounding box
20 SPItem* item = SP_ITEM(lpeitem);
22 Geom::Matrix transform;
23 if (absolute) {
24 transform = sp_item_i2doc_affine(item);
25 }
26 else {
27 transform = Geom::identity();
28 }
30 Geom::Rect itemBBox = item->getBounds(transform, SPItem::GEOMETRIC_BBOX);
31 boundingbox_X = itemBBox[Geom::X];
32 boundingbox_Y = itemBBox[Geom::Y];
33 }
35 } // namespace LivePathEffect
36 } /* namespace Inkscape */
38 /*
39 Local Variables:
40 mode:c++
41 c-file-style:"stroustrup"
42 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
43 indent-tabs-mode:nil
44 fill-column:99
45 End:
46 */
47 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :