From 57a6fee4d17b6049b95ccf2ef445ed18c8a2a841 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Wed, 4 Aug 2010 23:08:41 +0200 Subject: Wholesale cruft removal part 2 (bzr r9508.1.45) --- src/sp-path.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 54d2a201a..dd6f60eb7 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -25,8 +25,7 @@ #include "live_effects/lpeobject-reference.h" #include "sp-lpe-item.h" -#include -#include +#include "display/curve.h" #include <2geom/pathvector.h> #include <2geom/bezier-curve.h> #include <2geom/hvlinesegment.h> -- 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 From 2be2cf32db0668dc64512a98f6c2394152bd10cc Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sat, 16 Jul 2011 00:42:39 -0700 Subject: Cleanup of oudated/redundant SP_ITEM() macro use. (bzr r10461) --- src/sp-path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index c8022d351..6191d114f 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -169,7 +169,7 @@ sp_path_convert_to_guides(SPItem *item) std::list > pts; - Geom::Affine const i2d (SP_ITEM(path)->i2d_affine()); + Geom::Affine const i2d(path->i2d_affine()); Geom::PathVector const & pv = curve->get_pathvector(); for(Geom::PathVector::const_iterator pit = pv.begin(); pit != pv.end(); ++pit) { -- cgit v1.2.3 From eed6e9c2c229b10911a23976c47da79fc70a5b87 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 17 Jul 2011 21:47:09 +0200 Subject: - rename SPItem::i2d_affine to i2dt_affine, to clarify that it is item-to-desktop, not item-to-document. This should make it easier to spot bugs. - tag some instances where the document-to-desktop transform has been hardcoded (bzr r10466) --- src/sp-path.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 6191d114f..d9fb006f2 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -169,7 +169,7 @@ sp_path_convert_to_guides(SPItem *item) std::list > pts; - Geom::Affine const i2d(path->i2d_affine()); + Geom::Affine const i2dt(path->i2dt_affine()); Geom::PathVector const & pv = curve->get_pathvector(); for(Geom::PathVector::const_iterator pit = pv.begin(); pit != pv.end(); ++pit) { @@ -177,7 +177,7 @@ sp_path_convert_to_guides(SPItem *item) // only add curves for straight line segments if( is_straight_curve(*cit) ) { - pts.push_back(std::make_pair(cit->initialPoint() * i2d, cit->finalPoint() * i2d)); + pts.push_back(std::make_pair(cit->initialPoint() * i2dt, cit->finalPoint() * i2dt)); } } } -- cgit v1.2.3 From 97b1c4d688a979eb8e327c13c6bcc6fad20902f2 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 19 Jul 2011 20:24:59 +0200 Subject: remove some unnecessary inkscape_active_desktop() calls (bzr r10477) --- src/sp-path.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-path.cpp') diff --git a/src/sp-path.cpp b/src/sp-path.cpp index d9fb006f2..49cadc116 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -182,7 +182,7 @@ sp_path_convert_to_guides(SPItem *item) } } - sp_guide_pt_pairs_to_guides(inkscape_active_desktop(), pts); + sp_guide_pt_pairs_to_guides(item->document, pts); } /** -- cgit v1.2.3