| Ticket UUID: | 1081603 | |||
| Title: | Arc item anomalies under Windows | |||
| Type: | Bug | Version: | obsolete: 8.4.7 | |
| Submitter: | jgodfrey | Created on: | 2004-12-08 20:23:24 | |
| Subsystem: | 05. Canvas Items | Assigned To: | nobody | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Open | Last Modified: | 2025-10-21 08:10:11 | |
| Resolution: | None | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
WinXP Pro SP2 / ActiveTCL 8.4.7
Canvas arc items seem to have a few (rounding related?)
issues that cause various display problems. The
problems are illustrated in the following script:
=============
canvas .c -width 400 -height 400
pack .c
# four radiused corners
.c create arc 100 300 200 200 \
-start 180 -extent 90 -style arc
.c create arc 100 100 200 200 \
-start 90 -extent 90 -style arc
.c create arc 200 100 300 200 \
-start 0 -extent 90 -style arc
.c create arc 200 200 300 300 \
-start 270 -extent 90 -style arc
# center arc segment
.c create arc 190 190 210 210 -start 3 -extent 5
# edge lines
.c create line 150 100 250 100
.c create line 150 300 250 300
.c create line 100 150 100 250
.c create line 300 150 300 250
========
The code just creates a square with radiused corners
and an internal arc segment. Using Windows XP Pro SP2
and ActiveTCL 8.4.7, I notice the following:
1. The arc in the upper left hand corner does not
connect with the left hand vertical line (at its 9 o'clock
position)
2. The arc in the lower left hand corner does not
connect with the lower horizontal line (at its 6 o'clock
position)
3. The arc draw in the center of the figure (described as
a total of 5 included degrees) is drawn as a complete
circle.
If you comment out the "-style arc" option on the first 4
arcs and comment out the 4 line segments, you can see
some problems with the several of the "corner" arcs with
respect to how their endpoints relate to the edges of
the "pie slice". For instance, on the lower left hand arc,
the 6 o'clock position doesn't quite meet the edge and
the 9 o'clock position is drawn a pixel or two past the
edge. This, in turn, is what leads to the "gaps" seen in
the test program.
Interestingly, running the same example on the same
hardware, but under Linux (in this case, Puppy Linux)
everything looks as expected. The outer object
boundary appears to be completely connected, and the
center arc segment is drawn correctly (not as a
complete circle).
Jeff
| |||
| User Comments: |
oehhar added on 2025-10-21 08:10:11:
The small extend rendering as 360° on MS-Win is fixed with ticket[6051a9fc], including the patch by Francois (Thanks!) ! The pixel differences in connecting remain. Harald fvogel added on 2017-11-26 19:54:31: Small testcase showing that the arc does not correctly connect, on Windows: package require Tk pack [canvas .c -width 400 -height 400] .c create arc 0 100 300 400 -start 0 -extent 90 What is not correct with this is: 1. One pixel is missing at the junction between the horizontal line and the arc, i.e. the arc does not start at 0° but slightly after this angle. 2. Several pixels display past the vertical line, i.e. the arc extends beyond 90°. fvogel added on 2017-10-08 16:52:53: Small arc rendering problem only happened on Windows, not on Linux nor on OS X. No need for a fix regarding the latter platforms. fvogel added on 2017-10-08 16:50:58: Test script for the small arc problem: package require Tk canvas .c -width 400 -height 400 pack .c .c create arc 190 190 210 210 -start 3 -extent 5 -style arc .c create arc 190 190 210 210 -start 93 -extent 5 -style arc .c create arc 190 190 210 210 -start 183 -extent 5 -style arc .c create arc 190 190 210 210 -start 273 -extent 5 -style arc fvogel added on 2017-10-08 16:46:31: I think I have addressed the problem of the small arc erroneously drawing as full circles, see [ed8e17ccda] in branch bug-1081603fff. hume added on 2007-09-26 03:56:07: Logged In: YES user_id=625620 Originator: NO On windows only small arc extents can be drawn incorrectly when a repaint occurs. I have seen this with extents up to 3 with Tk 8.4.11. For example, canvas .c pack .c .c create arc 88 88 112 112 -style arc -start -270 -width 2 -extent 2 # Tiny arc above is drawn correctly at first, now use the mouse to # select and drag on the window border. The arc is redrawn as a circle. In some situations the repaint does not seem necessary - the incorrect circles are drawn at once. I do not know why the above example requires a repaint. As a workaround, small line segments can be drawn for tiny arcs. Regards, Ed hobbs added on 2005-05-31 10:46:48: Logged In: YES user_id=72656 see also 1187074 | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki