This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kms70847
Recipients kms70847, paul.moore, steve.dower, tim.golden, zach.ware
Date 2016-05-19.15:12:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463670778.9.0.698531599823.issue27058@psf.upfronthosting.co.za>
In-reply-to
Content
When creating a dashed line using `Canvas.create_line`. Minimal reproducing example:

    from Tkinter import *
    root = Tk()
    canvas = Canvas(root, width=100, height=30, bg="black")
    canvas.pack()
    canvas.create_line((0,10,100,10), dash=(20,), fill="red")
    canvas.create_line((0,20,100,20), dash=(20,20), fill="green")
    root.mainloop()

Expected result: each line segment should be 20 pixels wide, separated by gaps 20 pixels wide.

Actual result: each line segment is 18 pixels wide, separated by gaps 6 pixels wide. See attached file for screenshot.

Additional information: this problem appears to only occur on Windows. The Stack Overflow Python chat room attempted to replicate this issue, starting around here: http://chat.stackoverflow.com/transcript/message/30645798#30645798. Users of Windows 7, 8, and 10 were able to replicate the incorrect segmenting behavior. Users of Linux had correct segment lengths. (some Windows & 2.7 users also noticed that their green line was 3 pixel segments with 3 pixel gaps, but this seems to be an independent bug which was already fixed somewhere between 2.7.2 and 2.7.10.)
History
Date User Action Args
2016-05-19 15:12:58kms70847setrecipients: + kms70847, paul.moore, tim.golden, zach.ware, steve.dower
2016-05-19 15:12:58kms70847setmessageid: <1463670778.9.0.698531599823.issue27058@psf.upfronthosting.co.za>
2016-05-19 15:12:58kms70847linkissue27058 messages
2016-05-19 15:12:58kms70847create