summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-knot.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-04-27 23:39:29 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-04-27 23:39:29 +0000
commitc883d7627a479c8c5b6a9f77b9841fa5631572ad (patch)
treefba1186e26a8cc85a1b0728425bef6f2e9aeccd9 /src/live_effects/lpe-knot.cpp
parentextensions. ink2canvas.py - do not parse html comments. (Bug 1446204) (diff)
downloadinkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.tar.gz
inkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.zip
2Geom sync - initial commit
(bzr r14059.2.1)
Diffstat (limited to 'src/live_effects/lpe-knot.cpp')
-rw-r--r--src/live_effects/lpe-knot.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index 820221abf..84e4deda7 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -155,7 +155,7 @@ findShadowedTime(Geom::Path const &patha, std::vector<Geom::Point> const &pt_and
// -for each component, the time at which this crossing occurs + the order of this crossing along the component (when starting from 0).
namespace LPEKnotNS {//just in case...
-CrossingPoints::CrossingPoints(std::vector<Geom::Path> const &paths) : std::vector<CrossingPoint>(){
+CrossingPoints::CrossingPoints(Geom::PathVector const &paths) : std::vector<CrossingPoint>(){
// std::cout<<"\nCrossingPoints creation from path vector\n";
for( unsigned i=0; i<paths.size(); i++){
for( unsigned ii=0; ii < size_nondegenerate(paths[i]); ii++){
@@ -391,11 +391,11 @@ LPEKnot::updateSwitcher(){
}
}
-std::vector<Geom::Path>
-LPEKnot::doEffect_path (std::vector<Geom::Path> const &path_in)
+Geom::PathVector
+LPEKnot::doEffect_path (Geom::PathVector const &path_in)
{
using namespace Geom;
- std::vector<Geom::Path> path_out;
+ Geom::PathVector path_out;
if (gpaths.size()==0){
return path_in;
@@ -486,8 +486,9 @@ LPEKnot::doEffect_path (std::vector<Geom::Path> const &path_in)
++beg_comp;
--end_comp;
Path first = gpaths[i0].portion(dom.back());
- //FIXME: STITCH_DISCONTINUOUS should not be necessary (?!?)
- first.append(gpaths[i0].portion(dom.front()), Path::STITCH_DISCONTINUOUS);
+ //FIXME: stitching should not be necessary (?!?)
+ first.setStitching(true);
+ first.append(gpaths[i0].portion(dom.front()));
path_out.push_back(first);
}
}
@@ -503,7 +504,7 @@ LPEKnot::doEffect_path (std::vector<Geom::Path> const &path_in)
//recursively collect gpaths and stroke widths (stolen from "sp-lpe_item.cpp").
static void
-collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector<Geom::Path> &paths, std::vector<double> &stroke_widths){
+collectPathsAndWidths (SPLPEItem const *lpeitem, Geom::PathVector &paths, std::vector<double> &stroke_widths){
if (SP_IS_GROUP(lpeitem)) {
GSList const *item_list = sp_item_group_item_list(SP_GROUP(lpeitem));
for ( GSList const *iter = item_list; iter; iter = iter->next ) {
@@ -615,8 +616,7 @@ LPEKnot::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::Pat
svgd = "M 10,0 C 10,5.52 5.52,10 0,10 -5.52,10 -10,5.52 -10,0 c 0,-5.52 4.48,-10 10,-10 5.52,0 10,4.48 10,10 z";
}
PathVector pathv = sp_svg_read_pathv(svgd);
- pathv *= Affine(r,0,0,r,0,0);
- pathv += switcher;
+ pathv *= Affine(r,0,0,r,0,0) * Translate(switcher);
hp_vec.push_back(pathv);
}