summaryrefslogtreecommitdiffstats
path: root/src/livarot
diff options
context:
space:
mode:
authorrocifier <rocifier@gmail.com>2019-03-16 11:51:56 +0000
committerRyan O'Connor <rocifier@gmail.com>2019-03-17 00:51:22 +0000
commit7124ed7b78f41b15cfd66f4779a379e58b3dddd2 (patch)
treea5480f414466f0e0f765d6290cf6a0cb9cf3b827 /src/livarot
parentMake InkscapeApplication responsible for managing documents and windows. (diff)
downloadinkscape-7124ed7b78f41b15cfd66f4779a379e58b3dddd2.tar.gz
inkscape-7124ed7b78f41b15cfd66f4779a379e58b3dddd2.zip
arc polygonization uses arc's scale for precision
Diffstat (limited to 'src/livarot')
-rw-r--r--src/livarot/PathConversion.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp
index dfea8755d..737ecbeeb 100644
--- a/src/livarot/PathConversion.cpp
+++ b/src/livarot/PathConversion.cpp
@@ -825,9 +825,10 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE,
Geom::Scale const ar(rx, ry);
Geom::Rotate cb(sang);
Geom::Rotate cbangle(angle*M_PI/180.0);
+
if (wise) {
- double const incr = -0.1;
+ double const incr = -0.1/sqrt(ar.vector().length());
if ( sang < eang ) {
sang += 2*M_PI;
}
@@ -839,7 +840,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE,
} else {
- double const incr = 0.1;
+ double const incr = 0.1/sqrt(ar.vector().length());
if ( sang > eang ) {
sang -= 2*M_PI;
}
@@ -969,9 +970,9 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE,
Geom::Scale const ar(rx, ry);
Geom::Rotate cb(sang);
Geom::Rotate cbangle(angle*M_PI/180.0);
- if (wise) {
- double const incr = -0.1;
+ if (wise) {
+ double const incr = -0.1/sqrt(ar.vector().length());
if ( sang < eang ) {
sang += 2*M_PI;
}
@@ -983,7 +984,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE,
} else {
- double const incr = 0.1;
+ double const incr = 0.1/sqrt(ar.vector().length());
if ( sang > eang ) {
sang -= 2 * M_PI;
}
@@ -1090,7 +1091,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE,
Geom::Rotate cbangle(angle*M_PI/180.0);
if (wise) {
- double const incr = -0.1;
+ double const incr = -0.1/sqrt(ar.vector().length());
if ( sang < eang ) {
sang += 2*M_PI;
}
@@ -1101,7 +1102,7 @@ void Path::DoArc(Geom::Point const &iS, Geom::Point const &iE,
}
} else {
- double const incr = 0.1;
+ double const incr = 0.1/sqrt(ar.vector().length());
if ( sang > eang ) {
sang -= 2*M_PI;
}