Posted to tcl by fvogel at Sat Sep 09 06:55:28 GMT 2017view raw
- Index: generic/tkRectOval.c
- ==================================================================
- --- generic/tkRectOval.c
- +++ generic/tkRectOval.c
- @@ -760,12 +760,31 @@
- Tk_CanvasDrawableCoords(canvas, rectOvalPtr->bbox[2],rectOvalPtr->bbox[3],
- &x2, &y2);
- if (x2 <= x1) {
- x2 = x1+1;
- }
- - if (y2 <= y1) {
- - y2 = y1+1;
- + if (y2 == y1) {
- +// y2 = y1+1;
- + short cy1, cy2;
- +
- + cy1 = (int) (rectOvalPtr->bbox[1] - Canvas(canvas)->drawableYOrigin);
- + cy2 = (int) (rectOvalPtr->bbox[3] - Canvas(canvas)->drawableYOrigin);
- + if (cy1 == cy2) {
- + y2 += 1;
- + } else {
- + double dy1, dy2;
- +
- + dy1 = cy2 - (rectOvalPtr->bbox[1] - Canvas(canvas)->drawableYOrigin);
- + dy2 = (rectOvalPtr->bbox[3] - Canvas(canvas)->drawableYOrigin) - cy2;
- + if (dy2 > dy1) {
- + y1 = cy1 + 1;
- + y2 = cy2 + 1;
- + } else {
- + y1 = cy1;
- + y2 = cy2;
- + }
- + }
- }
- /*
- * Display filled part first (if wanted), then outline. If we're
- * stippling, then modify the stipple offset in the GC. Be sure to reset