summaryrefslogtreecommitdiffstats
path: root/src/sp-ellipse.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-08-30 21:35:42 +0000
committerMarkus Engel <markus.engel@tum.de>2013-08-30 21:35:42 +0000
commit8756c49b91fd4262b6770ac3b2f229209bdae96b (patch)
tree67ac89d7bc7c69e04e811324734dccafc07f33c9 /src/sp-ellipse.cpp
parentMerged from trunk (r12465). (diff)
parentMerge emf/wmf work (diff)
downloadinkscape-8756c49b91fd4262b6770ac3b2f229209bdae96b.tar.gz
inkscape-8756c49b91fd4262b6770ac3b2f229209bdae96b.zip
Merged from trunk (r12488).
(bzr r11608.1.120)
Diffstat (limited to 'src/sp-ellipse.cpp')
-rw-r--r--src/sp-ellipse.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp
index 294970fef..7c6066054 100644
--- a/src/sp-ellipse.cpp
+++ b/src/sp-ellipse.cpp
@@ -158,11 +158,11 @@ void SPGenericEllipse::set_shape() {
return;
}
- double rx, ry, s, e;
- double x0, y0, x1, y1, x2, y2, x3, y3;
+ double rx;
+ double ry;
+ double s;
double len;
gint slice = FALSE;
- // gint i;
if ((this->rx.computed < 1e-18) || (this->ry.computed < 1e-18)) {
return;
@@ -195,21 +195,21 @@ void SPGenericEllipse::set_shape() {
curve->moveto(cos(this->start), sin(this->start));
for (s = this->start; s < this->end; s += M_PI_2) {
- e = s + M_PI_2;
+ double e = s + M_PI_2;
if (e > this->end) {
e = this->end;
}
len = 4*tan((e - s)/4)/3;
- x0 = cos(s);
- y0 = sin(s);
- x1 = x0 + len * cos(s + M_PI_2);
- y1 = y0 + len * sin(s + M_PI_2);
- x3 = cos(e);
- y3 = sin(e);
- x2 = x3 + len * cos(e - M_PI_2);
- y2 = y3 + len * sin(e - M_PI_2);
+ double x0 = cos(s);
+ double y0 = sin(s);
+ double x1 = x0 + len * cos(s + M_PI_2);
+ double y1 = y0 + len * sin(s + M_PI_2);
+ double x3 = cos(e);
+ double y3 = sin(e);
+ double x2 = x3 + len * cos(e - M_PI_2);
+ double y2 = y3 + len * sin(e - M_PI_2);
#ifdef ELLIPSE_VERBOSE
g_print("step %d s %f e %f coords %f %f %f %f %f %f\n",
i, s, e, x1, y1, x2, y2, x3, y3);