You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
864 B
34 lines
864 B
From fabf05464f137875a5ee74fcc21938161ecca077 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
|
Date: Fri, 25 Jan 2013 12:25:36 +0100
|
|
Subject: [PATCH] Handle correctly negative angles in ellipse
|
|
|
|
---
|
|
src/lib/CDRParser.cpp | 10 ++++++++++
|
|
1 file changed, 10 insertions(+)
|
|
|
|
diff --git a/src/lib/CDRParser.cpp b/src/lib/CDRParser.cpp
|
|
index c30d987..a76a0a6 100644
|
|
--- 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)
|
|
--
|
|
1.7.11.7
|
|
|