summaryrefslogtreecommitdiffstats
path: root/src/sp-flowregion.cpp
diff options
context:
space:
mode:
authorThomas Holder <speleo3@users.sourceforge.net>2008-12-16 15:52:36 +0000
committerspeleo3 <speleo3@users.sourceforge.net>2008-12-16 15:52:36 +0000
commit4fc3975983c401a7fb95084ab2db10d609e36f05 (patch)
treeaab43b87dcf998923b3d7b1c21b2c5dfa4e15f17 /src/sp-flowregion.cpp
parentAdded "Add" button to the SVG Fonts dialog. (diff)
downloadinkscape-4fc3975983c401a7fb95084ab2db10d609e36f05.tar.gz
inkscape-4fc3975983c401a7fb95084ab2db10d609e36f05.zip
* remove sp_item_i2root_affine and sp_item_i2r_affine and replace all calls by
sp_item_i2doc_affine or sp_item_i2d_affine respectively * remove sp_root_bbox, root->c2p was considered in the wrong place there * in sp_item_i2doc_affine do not consider SP_ITEM(object)->transform for root node, because <svg> node does not have a transform attribute * fix style scaling for boolean operations (with viewBox) * fix zoom to fit drawing (with viewBox) * fix export area size for "export drawing" (with viewBox) * fix simultaneous movement of clone + original (with viewBox) (bzr r7010)
Diffstat (limited to 'src/sp-flowregion.cpp')
-rw-r--r--src/sp-flowregion.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index 3b45951b8..79007cac7 100644
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
@@ -55,7 +55,7 @@ static gchar * sp_flowregionexclude_description (SPItem * item);
static SPItemClass * flowregionexclude_parent_class;
-static void GetDest(SPObject* child,Shape **computed,NR::Matrix itr_mat);
+static void GetDest(SPObject* child,Shape **computed);
GType
sp_flowregion_get_type (void)
@@ -190,16 +190,13 @@ void SPFlowregion::UpdateComputed(void)
{
SPObject* object=SP_OBJECT(this);
- NR::Matrix itr_mat (sp_item_i2root_affine (SP_ITEM(object)));
- itr_mat = itr_mat.inverse();
-
for (std::vector<Shape*>::iterator it = computed.begin() ; it != computed.end() ; it++)
delete *it;
computed.clear();
for (SPObject* child = sp_object_first_child(object) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) {
Shape *shape = NULL;
- GetDest(child,&shape,itr_mat);
+ GetDest(child,&shape);
computed.push_back(shape);
}
}
@@ -414,11 +411,9 @@ void SPFlowregionExclude::UpdateComputed(void)
delete computed;
computed = NULL;
}
- NR::Matrix itr_mat (sp_item_i2root_affine (SP_ITEM(object)));
- itr_mat = itr_mat.inverse();
for (SPObject* child = sp_object_first_child(object) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) {
- GetDest(child,&computed,itr_mat);
+ GetDest(child,&computed);
}
}
@@ -510,15 +505,19 @@ static void UnionShape(Shape **base_shape, Shape const *add_shape)
}
}
-static void GetDest(SPObject* child,Shape **computed,NR::Matrix itr_mat)
+static void GetDest(SPObject* child,Shape **computed)
{
if ( child == NULL ) return;
SPCurve *curve=NULL;
+ Geom::Matrix tr_mat;
SPObject* u_child=child;
if ( SP_IS_USE(u_child) ) {
u_child=SP_USE(u_child)->child;
+ tr_mat = SP_ITEM(u_child)->getRelativeTransform(SP_OBJECT_PARENT(child));
+ } else {
+ tr_mat = SP_ITEM(u_child)->transform;
}
if ( SP_IS_SHAPE (u_child) ) {
curve = sp_shape_get_curve (SP_SHAPE (u_child));
@@ -528,8 +527,6 @@ static void GetDest(SPObject* child,Shape **computed,NR::Matrix itr_mat)
if ( curve ) {
Path* temp=new Path;
- Geom::Matrix tr_mat = sp_item_i2root_affine (SP_ITEM(u_child));
- tr_mat = (Geom::Matrix)itr_mat * tr_mat;
temp->LoadPathVector(curve->get_pathvector(), tr_mat, true);
Shape* n_shp=new Shape;
temp->Convert(0.25);