From 53933f5fea9d07d1ba6304b88439fba257ee8c34 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Wed, 2 Feb 2011 22:24:36 +0100 Subject: update to latest 2geom ! (bzr r10025) --- src/sp-path.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 66a70e0f1..5d84b468e 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -59,7 +59,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); @@ -170,7 +170,7 @@ sp_path_convert_to_guides(SPItem *item) std::list > 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) { @@ -372,8 +372,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; -- cgit v1.2.3 From 0e0ce7571944e0a9d60294b6efdc855e6df52db8 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Tue, 22 Feb 2011 01:17:44 -0800 Subject: Finished cleanup of outdated SP_OBJECT_REPR C macro. (bzr r10067) --- src/sp-path.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 5d84b468e..16e2fcc1b 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -414,7 +414,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"); @@ -428,7 +428,7 @@ g_message("sp_path_update_patheffect"); 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 @@ -450,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(); } } @@ -478,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); } /** -- cgit v1.2.3 From d6978fcea4a2ccd2d9cccefabc6558a74f332a6d Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 2 Apr 2011 00:59:01 +0200 Subject: add curve before LPE to SPShape. this is useful for helperpath display. It was inspired from fixing bug 407008 Fixed bugs: - https://launchpad.net/bugs/407008 (bzr r10142) --- src/sp-path.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 16e2fcc1b..9a27af2f0 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -425,6 +425,7 @@ 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) { -- cgit v1.2.3