diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-04-27 23:39:29 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-04-27 23:39:29 +0000 |
| commit | c883d7627a479c8c5b6a9f77b9841fa5631572ad (patch) | |
| tree | fba1186e26a8cc85a1b0728425bef6f2e9aeccd9 /src/live_effects/lpe-line_segment.cpp | |
| parent | extensions. ink2canvas.py - do not parse html comments. (Bug 1446204) (diff) | |
| download | inkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.tar.gz inkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.zip | |
2Geom sync - initial commit
(bzr r14059.2.1)
Diffstat (limited to 'src/live_effects/lpe-line_segment.cpp')
| -rw-r--r-- | src/live_effects/lpe-line_segment.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/live_effects/lpe-line_segment.cpp b/src/live_effects/lpe-line_segment.cpp index 78d286143..dfd8aea8f 100644 --- a/src/live_effects/lpe-line_segment.cpp +++ b/src/live_effects/lpe-line_segment.cpp @@ -48,16 +48,16 @@ LPELineSegment::doBeforeEffect (SPLPEItem const* lpeitem) Inkscape::UI::Tools::lpetool_get_limiting_bbox_corners(lpeitem->document, bboxA, bboxB); } -std::vector<Geom::Path> -LPELineSegment::doEffect_path (std::vector<Geom::Path> const & path_in) +Geom::PathVector +LPELineSegment::doEffect_path (Geom::PathVector const & path_in) { - std::vector<Geom::Path> output; + Geom::PathVector output; - A = initialPoint(path_in); - B = finalPoint(path_in); + A = path_in.initialPoint(); + B = path_in.finalPoint(); Geom::Rect dummyRect(bboxA, bboxB); - boost::optional<Geom::LineSegment> intersection_segment = Geom::rect_line_intersect(dummyRect, Geom::Line(A, B)); + boost::optional<Geom::LineSegment> intersection_segment = Geom::Line(A, B).clip(dummyRect); if (!intersection_segment) { g_print ("Possible error - no intersection with limiting bounding box.\n"); @@ -65,11 +65,11 @@ LPELineSegment::doEffect_path (std::vector<Geom::Path> const & path_in) } if (end_type == END_OPEN_INITIAL || end_type == END_OPEN_BOTH) { - A = (*intersection_segment).initialPoint(); + A = intersection_segment->initialPoint(); } if (end_type == END_OPEN_FINAL || end_type == END_OPEN_BOTH) { - B = (*intersection_segment).finalPoint(); + B = intersection_segment->finalPoint(); } Geom::Path path(A); |
