Menu

#1864 Aqua: XDrawLine draws nothing with Tk_GCForColor

open
4
2006-06-18
2005-02-24
No

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.

Reference Tile Bug #1115785 for more details.

Discussion

  • Jim Ingham

    Jim Ingham - 2005-03-13

    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.

     
  • Jim Ingham

    Jim Ingham - 2005-03-13

    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.

     
  • Michael Kirkham

    Michael Kirkham - 2005-03-13

    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.

     
  • Daniel A. Steffen

    • priority: 5 --> 4
     
MongoDB Logo MongoDB