summaryrefslogtreecommitdiffstats
path: root/src/sp-path.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-04-07 23:42:04 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-04-07 23:42:04 +0000
commit945ce419c806c73d70203dec33ececafbe108a92 (patch)
treecfcdb59bf47e9db7f9e01f7eebb59924bdeaea94 /src/sp-path.cpp
parentMerge from trunk (again) (diff)
parentExtensions. SVG+media fix (see Bug #400356). (diff)
downloadinkscape-945ce419c806c73d70203dec33ececafbe108a92.tar.gz
inkscape-945ce419c806c73d70203dec33ececafbe108a92.zip
Merge from trunk
(bzr r9508.1.73)
Diffstat (limited to 'src/sp-path.cpp')
-rw-r--r--src/sp-path.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/sp-path.cpp b/src/sp-path.cpp
index dbba440da..c8022d351 100644
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
@@ -58,7 +58,7 @@ static void sp_path_build(SPObject *object, SPDocument *document, Inkscape::XML:
static void sp_path_set(SPObject *object, unsigned key, gchar const *value);
static Inkscape::XML::Node *sp_path_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static Geom::Matrix sp_path_set_transform(SPItem *item, Geom::Matrix const &xform);
+static Geom::Affine sp_path_set_transform(SPItem *item, Geom::Affine const &xform);
static gchar * sp_path_description(SPItem *item);
static void sp_path_convert_to_guides(SPItem *item);
@@ -169,7 +169,7 @@ sp_path_convert_to_guides(SPItem *item)
std::list<std::pair<Geom::Point, Geom::Point> > pts;
- Geom::Matrix const i2d (SP_ITEM(path)->i2d_affine());
+ Geom::Affine const i2d (SP_ITEM(path)->i2d_affine());
Geom::PathVector const & pv = curve->get_pathvector();
for(Geom::PathVector::const_iterator pit = pv.begin(); pit != pv.end(); ++pit) {
@@ -371,8 +371,8 @@ sp_path_update(SPObject *object, SPCtx *ctx, guint flags)
/**
* Writes the given transform into the repr for the given item.
*/
-static Geom::Matrix
-sp_path_set_transform(SPItem *item, Geom::Matrix const &xform)
+static Geom::Affine
+sp_path_set_transform(SPItem *item, Geom::Affine const &xform)
{
SPShape *shape = (SPShape *) item;
SPPath *path = (SPPath *) item;
@@ -413,7 +413,7 @@ sp_path_update_patheffect(SPLPEItem *lpeitem, bool write)
{
SPShape * const shape = (SPShape *) lpeitem;
SPPath * const path = (SPPath *) lpeitem;
- Inkscape::XML::Node *repr = SP_OBJECT_REPR(shape);
+ Inkscape::XML::Node *repr = shape->getRepr();
#ifdef PATH_VERBOSE
g_message("sp_path_update_patheffect");
@@ -424,10 +424,11 @@ g_message("sp_path_update_patheffect");
/* if a path does not have an lpeitem applied, then reset the curve to the original_curve.
* This is very important for LPEs to work properly! (the bbox might be recalculated depending on the curve in shape)*/
shape->setCurveInsync(curve, TRUE);
+ shape->setCurveBeforeLPE(path->original_curve);
bool success = sp_lpe_item_perform_path_effect(SP_LPE_ITEM(shape), curve);
if (success && write) {
- // could also do SP_OBJECT(shape)->updateRepr(); but only the d attribute needs updating.
+ // could also do shape->getRepr()->updateRepr(); but only the d attribute needs updating.
#ifdef PATH_VERBOSE
g_message("sp_path_update_patheffect writes 'd' attribute");
#endif
@@ -449,7 +450,7 @@ g_message("sp_path_update_patheffect writes 'd' attribute");
}
}
}
- SP_OBJECT(shape)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+ shape->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
curve->unref();
}
}
@@ -477,7 +478,7 @@ sp_path_set_original_curve (SPPath *path, SPCurve *curve, unsigned int owner, bo
}
}
sp_lpe_item_update_patheffect(path, true, write);
- SP_OBJECT(path)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
+ path->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
}
/**