summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-09-05 18:30:18 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-09-05 18:30:18 +0000
commite043dcd131751f2a0d29068f178fc008dc8c73d7 (patch)
tree835db913744ed84c3e215da798002cbba01ca3ae
parentLPE Powerstroke: add Centripetal Catmull-Rom interpolator (diff)
downloadinkscape-e043dcd131751f2a0d29068f178fc008dc8c73d7.tar.gz
inkscape-e043dcd131751f2a0d29068f178fc008dc8c73d7.zip
LPE Powerstroke: enable Extrapolated arc, remove Extrapolated (mirroring)
The code to deal with Extrapolated mirroring is still working (if someone has an old file with that type of extrapolation), but perhaps that should also be removed. (bzr r13546)
-rw-r--r--src/live_effects/lpe-powerstroke.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index eed564b20..b8657e165 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -220,12 +220,10 @@ enum LineJoinType {
static const Util::EnumData<unsigned> LineJoinTypeData[] = {
{LINEJOIN_BEVEL, N_("Beveled"), "bevel"},
{LINEJOIN_ROUND, N_("Rounded"), "round"},
- {LINEJOIN_EXTRP_MITER, N_("Extrapolated"), "extrapolated"},
+// {LINEJOIN_EXTRP_MITER, N_("Extrapolated"), "extrapolated"}, // disabled because doesn't work well
+ {LINEJOIN_EXTRP_MITER_ARC, N_("Extrapolated arc"), "extrp_arc"},
{LINEJOIN_MITER, N_("Miter"), "miter"},
{LINEJOIN_SPIRO, N_("Spiro"), "spiro"},
-#ifdef LPE_ENABLE_TEST_EFFECTS
- {LINEJOIN_EXTRP_MITER_ARC, N_("Extrapolated arc"), "extrp_arc"},
-#endif
};
static const Util::EnumDataConverter<unsigned> LineJoinTypeConverter(LineJoinTypeData, sizeof(LineJoinTypeData)/sizeof(*LineJoinTypeData));
@@ -407,8 +405,9 @@ static Geom::Path path_from_piecewise_fix_cusps( Geom::Piecewise<Geom::D2<Geom::
break;
}
case LINEJOIN_EXTRP_MITER_ARC: {
- Geom::Circle circle1 = Geom::touching_circle(reverse(B[prev_i]),0.);
- Geom::Circle circle2 = Geom::touching_circle(B[i],0.);
+ // Extrapolate using the curvature at the end of the path segments to join
+ Geom::Circle circle1 = Geom::touching_circle(reverse(B[prev_i]), 0.0);
+ Geom::Circle circle2 = Geom::touching_circle(B[i], 0.0);
Geom::Point points[2];
int solutions = circle_circle_intersection(circle1, circle2, points[0], points[1]);
if (solutions == 2) {