diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-03-30 20:57:10 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-03-30 20:57:10 (GMT) |
commit | 4fe292708215d10e64caf87973880e14bb8f6c58 (patch) | |
tree | b0cccf60a0c4b77153dea53204a5725a453eeb2d /tksao/frame | |
parent | e831cb2e08e0d0a08d16608a1b9c29b4ea10e18f (diff) | |
download | blt-4fe292708215d10e64caf87973880e14bb8f6c58.zip blt-4fe292708215d10e64caf87973880e14bb8f6c58.tar.gz blt-4fe292708215d10e64caf87973880e14bb8f6c58.tar.bz2 |
fixed windows fill region issues
Diffstat (limited to 'tksao/frame')
-rw-r--r-- | tksao/frame/baseellipse.C | 17 | ||||
-rw-r--r-- | tksao/frame/baseellipse.h | 4 | ||||
-rw-r--r-- | tksao/frame/box.C | 1 | ||||
-rw-r--r-- | tksao/frame/circle.C | 15 | ||||
-rw-r--r-- | tksao/frame/circle.h | 3 | ||||
-rw-r--r-- | tksao/frame/ellipse.C | 15 | ||||
-rw-r--r-- | tksao/frame/ellipse.h | 3 |
7 files changed, 21 insertions, 37 deletions
diff --git a/tksao/frame/baseellipse.C b/tksao/frame/baseellipse.C index 842707a..8a7436b 100644 --- a/tksao/frame/baseellipse.C +++ b/tksao/frame/baseellipse.C @@ -692,7 +692,7 @@ void BaseEllipse::renderWIN32() { if (isRound && isScale && isOrient && parent->isAzElZero()) renderWIN32Circle(); else - renderWIN32EllipseCurve(); + renderWIN32Ellipse(); } void BaseEllipse::renderWIN32Circle() @@ -717,17 +717,18 @@ void BaseEllipse::renderWIN32Circle() if (a2<=a1) a2 += M_TWOPI; - renderWIN32CircleDraw(cc, l, a1, a2); + win32Arc(cc, l, a1, a2); + + renderWIN32Draw(); } } -void BaseEllipse::renderWIN32CircleDraw(Vector& cc, double l, - float a1, float a2) +void BaseEllipse::renderWIN32Draw() { - win32DrawArc(cc, l, a1, a2); + win32Stroke(); } -void BaseEllipse::renderWIN32EllipseCurve() +void BaseEllipse::renderWIN32Ellipse() { renderWIN32GC(); @@ -754,6 +755,8 @@ void BaseEllipse::renderWIN32EllipseCurve() if (s1&&s2) s1=s2=0; + + renderWIN32Draw(); } } } @@ -802,7 +805,7 @@ void BaseEllipse::renderWIN32EllipseArc(double a1, double a2, Vector& rr) Vector xx2 = fwdMap(x2*FlipY(),Coord::CANVAS); Vector tt1 = fwdMap(t1*FlipY(),Coord::CANVAS); - win32DrawCurve(tt0, xx1, xx2, tt1); + win32Curve(tt0, xx1, xx2, tt1); } void BaseEllipse::renderWIN32Include() diff --git a/tksao/frame/baseellipse.h b/tksao/frame/baseellipse.h index cdeb12c..778e46c 100644 --- a/tksao/frame/baseellipse.h +++ b/tksao/frame/baseellipse.h @@ -43,7 +43,7 @@ class BaseEllipse : public BaseMarker { #ifdef __WIN32 void renderWIN32Circle(); - void renderWIN32EllipseCurve(); + void renderWIN32Ellipse(); void renderWIN32EllipsePrep(double, double, double, double, Vector&); void renderWIN32EllipseArc(double, double, Vector&); void renderWIN32Include(); @@ -66,7 +66,7 @@ class BaseEllipse : public BaseMarker { #endif #ifdef __WIN32 void renderWIN32(); - virtual void renderWIN32CircleDraw(Vector&, double, float, float); + virtual void renderWIN32Draw(); #endif virtual void updateHandles(); diff --git a/tksao/frame/box.C b/tksao/frame/box.C index 43e1898..9d4a410 100644 --- a/tksao/frame/box.C +++ b/tksao/frame/box.C @@ -75,6 +75,7 @@ void Box::renderMACOSXDraw(Vector* vv) #ifdef __WIN32 void Box::renderWIN32Draw(Vector* vv) +{ if (fill_) win32FillPolygon(vv, numPoints_); else diff --git a/tksao/frame/circle.C b/tksao/frame/circle.C index e643e47..a4b2aca 100644 --- a/tksao/frame/circle.C +++ b/tksao/frame/circle.C @@ -97,21 +97,12 @@ void Circle::renderMACOSXDraw() #endif #ifdef __WIN32 -void Circle::renderWIN32CircleDraw(Vector& cc, double l, float a1, float a2) +void Circle::renderWIN32Draw() { if (fill_) - win32FillArc(cc, l, a1, a2); + win32Fill(); else - win32DrawArc(cc, l, a1, a2); -} - -void Circle::renderWIN32EllipseArcDraw(Vector& tt0, Vector& xx1, - Vector& xx2, Vector& tt1) -{ - if (fill_) - win32FillCurve(tt0, xx1, xx2, tt1); - else - win32DrawCurve(tt0, xx1, xx2, tt1); + win32Stroke(); } #endif diff --git a/tksao/frame/circle.h b/tksao/frame/circle.h index 6e50a06..9ebce28 100644 --- a/tksao/frame/circle.h +++ b/tksao/frame/circle.h @@ -22,8 +22,7 @@ class Circle : public BaseEllipse { #endif #ifdef __WIN32 - void renderWIN32CircleDraw(Vector&, double, float, float); - void renderWIN32EllipseArcDraw(Vector&, Vector&, Vector&, Vector&); + void renderWIN32Draw(); #endif void listNonCel(FitsImage*, ostream&, Coord::CoordSystem); diff --git a/tksao/frame/ellipse.C b/tksao/frame/ellipse.C index c07513a..8d9b1af 100644 --- a/tksao/frame/ellipse.C +++ b/tksao/frame/ellipse.C @@ -85,21 +85,12 @@ void Ellipse::renderMACOSXDraw() #endif #ifdef __WIN32 -void Ellipse::renderWIN32CircleDraw(Vector& cc, double l, float a1, float a2) +void Ellipse::renderWIN32Draw() { if (fill_) - win32FillArc(cc, l, a1, a2); + win32Fill(); else - win32DrawArc(cc, l, a1, a2); -} - -void Ellipse::renderWIN32EllipseArcDraw(Vector& tt0, Vector& xx1, - Vector& xx2, Vector& tt1) -{ - if (fill_) - win32FillCurve(tt0, xx1, xx2, tt1); - else - win32drawCurve(tt0, xx1, xx2, tt1); + win32Stroke(); } #endif diff --git a/tksao/frame/ellipse.h b/tksao/frame/ellipse.h index 43460f2..fde2c0d 100644 --- a/tksao/frame/ellipse.h +++ b/tksao/frame/ellipse.h @@ -22,8 +22,7 @@ class Ellipse : public BaseEllipse { #endif #ifdef __WIN32 - void renderWIN32CircleDraw(Vector&, double, float, float); - void renderWIN32EllipseArcDraw(Vector&, Vector&, Vector&, Vector&); + void renderWIN32Draw(); #endif void listNonCel(FitsImage*, ostream&, Coord::CoordSystem); |