Message265877
This problem appears to go deeper than Python. On the TK bug tracker, under the issue "-dashofset option doesnt work on ms windows build" (https://core.tcl.tk/tk/tktview?name=1055974fff), a commenter mentions:
> On Windows, only certain dash patterns and no dash offsets are supported.
Which implies that you can't create segments and gaps of arbitrary length ratios- you can only select from a limited collection of premade patterns. This comment from tkWinDraw.c (https://github.com/tcltk/tk/blob/master/win/tkWinDraw.c#L1188) supports this:
> Below is a simple translation of serveral dash patterns to valid windows pen types. Far from complete, but I don't know how to do it better.
The code goes on to invoke CreatePen (https://msdn.microsoft.com/en-us/library/windows/desktop/dd183509%28v=vs.85%29.aspx), which only allows for four different variations of dashed line styles.
Conclusions:
1) It isn't Python's fault.
2) The guy who wrote the Tk code was aware of the limitation at the time, so it's arguably not a bug.
So, this issue ought to be closed; not much we can do, except perhaps petition the popular Tkinter reference websites to put up a warning label on their descriptions of the `dash` keyword argument. |
|
Date |
User |
Action |
Args |
2016-05-19 17:23:02 | kms70847 | set | recipients:
+ kms70847, paul.moore, tim.golden, zach.ware, serhiy.storchaka, steve.dower |
2016-05-19 17:23:02 | kms70847 | set | messageid: <1463678582.77.0.824628437301.issue27058@psf.upfronthosting.co.za> |
2016-05-19 17:23:02 | kms70847 | link | issue27058 messages |
2016-05-19 17:23:02 | kms70847 | create | |
|