The line width for the GC returned by Tk_GCForColor is
zero. This results in XDrawLine drawing nothing under
Aqua, where other platforms a line is drawn with a
default width of 1.
This is simple to fix, the patch is just to change the default line_width in
tk/xlib/xgc.c from 0 to 1 in XCreateGC. But why is Tile drawing lines
without specifying the linewidths? Tk always specifies width (which is why
this behavior never showed up.) And in Tk_GetGC - which is generally
how Tk gets its GC's for drawing, it also sets the line width to 0 if it is not
specified.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is simple to fix, the patch is just to change the default line_width in
tk/xlib/xgc.c from 0 to 1 in XCreateGC. But why is Tile drawing lines
without specifying the linewidths? Tk always specifies width (which is why
this behavior never showed up.) And in Tk_GetGC - which is generally
how Tk gets its GC's for drawing, it also sets the line width to 0 if it is not
specified.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The lines in question are drawn with GCs created using
Tk_GCForColor. There is no way to specify a line width with
that, unless you change it with XChangeGC, which (according
to Joe) you're not really supposed to do with GC obtained
through Tk_GCForColor. At any rate, it's a bug on the mac
because the line width for such GCs is 1 everywhere else.
Thus the lines are drawn everywhere but the mac.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=169107
This is simple to fix, the patch is just to change the default line_width in
tk/xlib/xgc.c from 0 to 1 in XCreateGC. But why is Tile drawing lines
without specifying the linewidths? Tk always specifies width (which is why
this behavior never showed up.) And in Tk_GetGC - which is generally
how Tk gets its GC's for drawing, it also sets the line width to 0 if it is not
specified.
Logged In: YES
user_id=169107
This is simple to fix, the patch is just to change the default line_width in
tk/xlib/xgc.c from 0 to 1 in XCreateGC. But why is Tile drawing lines
without specifying the linewidths? Tk always specifies width (which is why
this behavior never showed up.) And in Tk_GetGC - which is generally
how Tk gets its GC's for drawing, it also sets the line width to 0 if it is not
specified.
Logged In: YES
user_id=498198
The lines in question are drawn with GCs created using
Tk_GCForColor. There is no way to specify a line width with
that, unless you change it with XChangeGC, which (according
to Joe) you're not really supposed to do with GC obtained
through Tk_GCForColor. At any rate, it's a bug on the mac
because the line width for such GCs is 1 everywhere else.
Thus the lines are drawn everywhere but the mac.