diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-03-13 21:19:54 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-03-13 21:19:54 (GMT) |
commit | 6540d31ff86f84e7fec205c93118ee7b71afa611 (patch) | |
tree | db3a6e0b7293696beda267f157d1939989679184 /tksao/frame/circle.C | |
parent | 8536c60bd238b8a901a590d1dc38c5727ca39305 (diff) | |
download | blt-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.C | 17 |
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); |