diff --git a/src/sp-flowregion.cpp b/src/sp-flowregion.cpp
index 3a6cdeee3bd880a673f987880d786b1a7cbc04c7..79007cac7735a7494fb43db723ef5395de4f491c 100644 (file)
--- a/src/sp-flowregion.cpp
+++ b/src/sp-flowregion.cpp
#include "sp-use.h"
#include "style.h"
#include "document.h"
+#include "sp-title.h"
+#include "sp-desc.h"
#include "sp-flowregion.h"
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)
{
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);
}
}
@@ -240,6 +239,7 @@ sp_flowregion_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscap
GSList *l = NULL;
for ( SPObject *child = sp_object_first_child(object) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
+ if (SP_IS_TITLE(child) || SP_IS_DESC(child)) continue;
Inkscape::XML::Node *crepr = child->updateRepr(xml_doc, NULL, flags);
if (crepr) l = g_slist_prepend(l, crepr);
}
@@ -252,6 +252,7 @@ sp_flowregion_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscap
} else {
for ( SPObject *child = sp_object_first_child(object) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
+ if (SP_IS_TITLE(child) || SP_IS_DESC(child)) continue;
child->updateRepr(flags);
}
}
{
SPObject* object=SP_OBJECT(this);
- if (computed) {
+ if (computed) {
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);
}
}
}
}
-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));
if ( curve ) {
Path* temp=new Path;
- NR::Matrix tr_mat=sp_item_i2root_affine (SP_ITEM(u_child));
- tr_mat=itr_mat*tr_mat;
- temp->LoadArtBPath(SP_CURVE_BPATH(curve),tr_mat,true);
+ temp->LoadPathVector(curve->get_pathvector(), tr_mat, true);
Shape* n_shp=new Shape;
temp->Convert(0.25);
temp->Fill(n_shp,0);