GNOME Bugzilla – Bug 81894
GC setting GDK_CAP_ROUND doesn't work
Last modified: 2011-02-04 16:11:52 UTC
A call to: gdk_gc_set_line_attributes(gc, line_width, line_style, GDK_CAP_ROUND, GDK_JOIN_ROUND); ignores the setting for the CAP style. The lines are still drawn with square caps.
(Probably really hard to fix... I doubt it will actually be fixed for 2.2.)
Is this on Win9x/Me or NT/2k/XP? The Platform SDK docs say: Windows 95/98/Me: The PS_ENDCAP_ROUND, PS_ENDCAP_SQUARE, PS_ENDCAP_FLAT, PS_JOIN_BEVEL, PS_JOIN_MITER, and PS_JOIN_ROUND styles are supported only for geometric pens when used to draw paths. GDK on Win32 does use geometric pens, but lines aren't drawn as paths. (The paths would then be filled to draw the line.) Could be, though, but is it worth it? It would also help for supporting stipples and tiles.
Now I notice you do say it's Win98. I really really would like to pretend 16-bit GDI is dead, at least from GTK+'s point of view. I.e., not add anyh more code just to work around deficiencies in Win9x GDI. Resolve as WONTFIX?
WONTFIX is fine with me :)
For whatever it is worth, I have put a test program (draw-star.c) that shows the bug in #81895.
I have added an attachement to bug #81895 that shows the difference rendering of caps at different line widths on win98 vs X. It appears that up to a line width of 6 the caps on windows 98 are always a a raster aligned square. This is the case for X as well up to including a line width of 3. The difference in the rendering of the caps is most clearly seen in line widths 4 and 5. E.g. the cap of a vertical line: WWW WWWWW WWWWW WWWWW WWWWW WWWWW Rendering on X Rendering on win98 I guess a few dedicated switches could improve the situation. But I tend to agree that it is really not that critical. Feel free to switch the bug to WONTFIX.
OK, resolving as WONTFIX ;-( I guess it would be possible to use the same mi* files (lifted from the XFree86 X11 server code) as in the linux-fb backend to get pixel- per-pixel identical behaviour as X11, but is it worth it? Hardly.