summaryrefslogtreecommitdiffstats
path: root/tksao/frame
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-12 20:17:58 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-12 20:17:58 (GMT)
commit6ae25727a3ba9919eab4dea3647462f12678e26b (patch)
treec95015f766a983075dfcd2caa624898390b7a4d3 /tksao/frame
parentaabb922a6082ccc5253e8206c5d15ec0073a1063 (diff)
downloadblt-6ae25727a3ba9919eab4dea3647462f12678e26b.zip
blt-6ae25727a3ba9919eab4dea3647462f12678e26b.tar.gz
blt-6ae25727a3ba9919eab4dea3647462f12678e26b.tar.bz2
add fill option ellipse
Diffstat (limited to 'tksao/frame')
-rw-r--r--tksao/frame/circle.C20
-rw-r--r--tksao/frame/ellipse.C20
2 files changed, 18 insertions, 22 deletions
diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C
index 02c0927..3ea410f 100644
--- a/tksao/frame/circle.C
+++ b/tksao/frame/circle.C
@@ -67,18 +67,16 @@ void Circle::renderXCircleDraw(Drawable drawable, GC lgc,
void Circle::renderPSCircleDraw(Vector& cc, double l, float a1, float a2)
{
ostringstream str;
+ str << "newpath "
+ << cc.TkCanvasPs(parent->canvas) << ' '
+ << l << ' '
+ << a1 << ' ' << a2 << ' '
+ << "arc ";
if (fill_)
- str << "newpath "
- << cc.TkCanvasPs(parent->canvas) << ' '
- << l << ' '
- << a1 << ' ' << a2 << ' '
- << "arc fill" << endl << ends;
+ str << "fill";
else
- str << "newpath "
- << cc.TkCanvasPs(parent->canvas) << ' '
- << l << ' '
- << a1 << ' ' << a2 << ' '
- << "arc stroke" << endl << ends;
+ str << "stroke";
+ str << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
@@ -104,7 +102,7 @@ void Circle::renderPSEllipseArcDraw(Vector& tt0, Vector& xx1,
<< "lineto "
<< tt1.TkCanvasPs(parent->canvas) << ' '
<< "lineto closepath gsave" << endl
- << "1 setlinejoin .5 setlinewidth stroke" << endl
+ << "1 setlinejoin .75 setlinewidth stroke" << endl
<< "grestore fill" << endl << ends;
}
else
diff --git a/tksao/frame/ellipse.C b/tksao/frame/ellipse.C
index cc75ef8..5366430 100644
--- a/tksao/frame/ellipse.C
+++ b/tksao/frame/ellipse.C
@@ -54,18 +54,16 @@ void Ellipse::renderXCircleDraw(Drawable drawable, GC lgc,
void Ellipse::renderPSCircleDraw(Vector& cc, double l, float a1, float a2)
{
ostringstream str;
+ str << "newpath "
+ << cc.TkCanvasPs(parent->canvas) << ' '
+ << l << ' '
+ << a1 << ' ' << a2 << ' '
+ << "arc ";
if (fill_)
- str << "newpath "
- << cc.TkCanvasPs(parent->canvas) << ' '
- << l << ' '
- << a1 << ' ' << a2 << ' '
- << "arc fill" << endl << ends;
+ str << "fill";
else
- str << "newpath "
- << cc.TkCanvasPs(parent->canvas) << ' '
- << l << ' '
- << a1 << ' ' << a2 << ' '
- << "arc stroke" << endl << ends;
+ str << "stroke";
+ str << endl << ends;
Tcl_AppendResult(parent->interp, str.str().c_str(), NULL);
}
@@ -91,7 +89,7 @@ void Ellipse::renderPSEllipseArcDraw(Vector& tt0, Vector& xx1,
<< "lineto "
<< tt1.TkCanvasPs(parent->canvas) << ' '
<< "lineto closepath gsave" << endl
- << "1 setlinejoin .5 setlinewidth stroke" << endl
+ << "1 setlinejoin .75 setlinewidth stroke" << endl
<< "grestore fill" << endl << ends;
}
else