summaryrefslogtreecommitdiffstats
path: root/tksao/frame/circle.C
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-13 21:19:54 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-13 21:19:54 (GMT)
commit6540d31ff86f84e7fec205c93118ee7b71afa611 (patch)
treedb3a6e0b7293696beda267f157d1939989679184 /tksao/frame/circle.C
parent8536c60bd238b8a901a590d1dc38c5727ca39305 (diff)
downloadblt-6540d31ff86f84e7fec205c93118ee7b71afa611.zip
blt-6540d31ff86f84e7fec205c93118ee7b71afa611.tar.gz
blt-6540d31ff86f84e7fec205c93118ee7b71afa611.tar.bz2
simplify code
Diffstat (limited to 'tksao/frame/circle.C')
-rw-r--r--tksao/frame/circle.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C
index 3015d07..87d29cb 100644
--- a/tksao/frame/circle.C
+++ b/tksao/frame/circle.C
@@ -61,6 +61,23 @@ void Circle::renderXCircleDraw(Drawable drawable, GC lgc,
BaseFillEllipse::renderXCircleDraw(display, drawable, lgc, st, size, a1, aa);
}
+void Circle::renderXEllipseDraw(Drawable drawable, GC lgc,
+ XPoint* pts, int cnt)
+{
+ if (fill_ || ((properties & SOURCE) && !(properties & DASH)))
+ BaseFillEllipse::renderXEllipseDraw(display, drawable, lgc, pts, cnt);
+ else {
+ // crude attempt to clip unwanted drawlines
+ // only works for SRC
+ for (int ii=0; ii<xpointNum_; ii+=2) {
+ XPoint* ptr1 = xpoint_+ii;
+ XPoint* ptr2 = xpoint_+ii+1;
+ XDrawLine(display, drawable, lgc,
+ (*ptr1).x, (*ptr1).y, (*ptr2).x, (*ptr2).y);
+ }
+ }
+}
+
void Circle::renderPSCircleDraw(Vector& cc, double l, float a1, float a2)
{
BaseFillEllipse::renderPSCircleDraw(parent, cc, l, a1, a2);