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-spiral.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-spiral.cpp') diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp index cfe02947a..abee41473 100644 --- a/src/sp-spiral.cpp +++ b/src/sp-spiral.cpp @@ -532,7 +532,7 @@ static void sp_spiral_snappoints(SPItem const *item, std::vectorgetSnapObjectMidpoints()) { - Geom::Matrix const i2d (item->i2d_affine ()); + Geom::Affine const i2d (item->i2d_affine ()); SPSpiral *spiral = SP_SPIRAL(item); p.push_back(Inkscape::SnapCandidatePoint(Geom::Point(spiral->cx, spiral->cy) * i2d, Inkscape::SNAPSOURCE_OBJECT_MIDPOINT, Inkscape::SNAPTARGET_OBJECT_MIDPOINT)); // This point is the start-point of the spiral, which is also returned when _snap_to_itemnode has been set -- 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-spiral.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sp-spiral.cpp') diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp index abee41473..e4bd0fa21 100644 --- a/src/sp-spiral.cpp +++ b/src/sp-spiral.cpp @@ -300,7 +300,7 @@ sp_spiral_update_patheffect(SPLPEItem *lpeitem, bool write) sp_spiral_set_shape(shape); if (write) { - Inkscape::XML::Node *repr = SP_OBJECT_REPR(shape); + Inkscape::XML::Node *repr = shape->getRepr(); if ( shape->curve != NULL ) { gchar *str = sp_svg_write_path(shape->curve->get_pathvector()); repr->setAttribute("d", str); @@ -422,9 +422,9 @@ sp_spiral_set_shape (SPShape *shape) if (sp_lpe_item_has_broken_path_effect(SP_LPE_ITEM(shape))) { g_warning ("The spiral shape has unknown LPE on it! Convert to path to make it editable preserving the appearance; editing it as spiral will remove the bad LPE"); - if (SP_OBJECT_REPR(shape)->attribute("d")) { + if (shape->getRepr()->attribute("d")) { // unconditionally read the curve from d, if any, to preserve appearance - Geom::PathVector pv = sp_svg_read_pathv(SP_OBJECT_REPR(shape)->attribute("d")); + Geom::PathVector pv = sp_svg_read_pathv(shape->getRepr()->attribute("d")); SPCurve *cold = new SPCurve(pv); shape->setCurveInsync( cold, TRUE); cold->unref(); @@ -435,7 +435,7 @@ sp_spiral_set_shape (SPShape *shape) Geom::Point darray[SAMPLE_SIZE + 1]; double t; - SP_OBJECT (spiral)->requestModified(SP_OBJECT_MODIFIED_FLAG); + spiral->requestModified(SP_OBJECT_MODIFIED_FLAG); SPCurve *c = new SPCurve (); -- 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-spiral.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sp-spiral.cpp') diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp index e4bd0fa21..05c6bc9cd 100644 --- a/src/sp-spiral.cpp +++ b/src/sp-spiral.cpp @@ -427,6 +427,7 @@ sp_spiral_set_shape (SPShape *shape) Geom::PathVector pv = sp_svg_read_pathv(shape->getRepr()->attribute("d")); SPCurve *cold = new SPCurve(pv); shape->setCurveInsync( cold, TRUE); + shape->setCurveBeforeLPE( cold ); cold->unref(); } return; @@ -470,6 +471,7 @@ sp_spiral_set_shape (SPShape *shape) /* Reset the shape'scurve 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( c, TRUE); + shape->setCurveBeforeLPE( c ); if (sp_lpe_item_has_path_effect(SP_LPE_ITEM(shape)) && sp_lpe_item_path_effects_enabled(SP_LPE_ITEM(shape))) { SPCurve *c_lpe = c->copy(); bool success = sp_lpe_item_perform_path_effect(SP_LPE_ITEM (shape), c_lpe); -- cgit v1.2.3