Posted to tcl by fvogel at Sat Sep 09 06:55:28 GMT 2017view raw

  1. Index: generic/tkRectOval.c
  2. ==================================================================
  3. --- generic/tkRectOval.c
  4. +++ generic/tkRectOval.c
  5. @@ -760,12 +760,31 @@
  6. Tk_CanvasDrawableCoords(canvas, rectOvalPtr->bbox[2],rectOvalPtr->bbox[3],
  7. &x2, &y2);
  8. if (x2 <= x1) {
  9. x2 = x1+1;
  10. }
  11. - if (y2 <= y1) {
  12. - y2 = y1+1;
  13. + if (y2 == y1) {
  14. +// y2 = y1+1;
  15. + short cy1, cy2;
  16. +
  17. + cy1 = (int) (rectOvalPtr->bbox[1] - Canvas(canvas)->drawableYOrigin);
  18. + cy2 = (int) (rectOvalPtr->bbox[3] - Canvas(canvas)->drawableYOrigin);
  19. + if (cy1 == cy2) {
  20. + y2 += 1;
  21. + } else {
  22. + double dy1, dy2;
  23. +
  24. + dy1 = cy2 - (rectOvalPtr->bbox[1] - Canvas(canvas)->drawableYOrigin);
  25. + dy2 = (rectOvalPtr->bbox[3] - Canvas(canvas)->drawableYOrigin) - cy2;
  26. + if (dy2 > dy1) {
  27. + y1 = cy1 + 1;
  28. + y2 = cy2 + 1;
  29. + } else {
  30. + y1 = cy1;
  31. + y2 = cy2;
  32. + }
  33. + }
  34. }
  35.  
  36. /*
  37. * Display filled part first (if wanted), then outline. If we're
  38. * stippling, then modify the stipple offset in the GC. Be sure to reset
  39.