summaryrefslogtreecommitdiff
path: root/libcdr
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-01-25 16:17:29 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-01-25 16:23:51 +0100
commitab0195a5a40e441dea72cc2950e74cbd777115d5 (patch)
tree858b17fb15a5bb2b1689f6ec778b2872314393e1 /libcdr
parent701cc2aa454b700f9e837d9ee3043598505a1405 (diff)
CDR: fix large-angle computation
Change-Id: Ia3f937b0b49093fbdbbe259b835a2d8a81633fe1
Diffstat (limited to 'libcdr')
-rw-r--r--libcdr/libcdr-0.0.10-ellipse.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/libcdr/libcdr-0.0.10-ellipse.patch b/libcdr/libcdr-0.0.10-ellipse.patch
new file mode 100644
index 000000000000..0b392a702b35
--- /dev/null
+++ b/libcdr/libcdr-0.0.10-ellipse.patch
@@ -0,0 +1,19 @@
+--- a/src/lib/CDRParser.cpp
++++ b/src/lib/CDRParser.cpp
+@@ -1186,6 +1186,16 @@ void libcdr::CDRParser::readEllipse(WPXInputStream *input)
+ double rx = fabs(cx);
+ double ry = fabs(cy);
+
++ while (angle1 < 0.0)
++ angle1 += 2*M_PI;
++ while (angle1 > 2*M_PI)
++ angle1 -= 2*M_PI;
++
++ while (angle2 < 0.0)
++ angle2 += 2*M_PI;
++ while (angle2 > 2*M_PI)
++ angle2 -= 2*M_PI;
++
+ if (angle1 != angle2)
+ {
+ if (angle2 < angle1)