gtk2/gdk/win32
Tor Lillqvist baad14eee0 Improve and simplify line segment rendering on Win32, especially the
2005-06-23  Tor Lillqvist  <tml@novell.com>

	Improve and simplify line segment rendering on Win32, especially
	the implementation of GDK_CAP_NOT_LAST, and dashed lines. Fixes
	bug #306396.

	* gdk/win32/gdkprivate-win32.h (GdkGCWin32): Save the GdkGC's
	line_style, cap_style and join_style as such in the
	GdkGCWin32. Don't need to keep the pen_double_dash flag, we can
	check the line_style.

	* gdk/win32/gdkgc-win32.c (fixup_pen): New internal function. Sets
	up the GDI pen type, style, end cap and join attributes to use
	based on the pen width, GDK line style, end cap style, and join
	style.

	For a narrow (zero-width) GDK pen with the GDK_CAP_NOT_LAST end
	cap style, which typically are used for XOR drawing where it is
	essential that the last pixel is not drawn, use a GDI cosmetic
	pen. Only for a cosmetic pen does GDI not draw the last pixel. I
	deduced this by experimetation, the documentation is rather vague.

	For other GDK pens use a geometric GDI pen. If the width is 0 or 1
	and the GDK end cap style is GDK_CAP_BUTT, and the line style is
	GDK_LINE_SOLID, use PS_ENDCAP_ROUND. This ensures that also
	single-pixel length lines are drawn. (For sngle-pixel width lines
	roundness as such is of course irrelevant.) For dashed lines, use
	PS_ENDCAP_FLAT.

	For wide lines use PS_ENDCAP_FLAT, _ROUND or _SQUARE,
	respectively, for GDK_CAP_BUTT, GDK_CAP_ROUND and GDK_CAP_PROJECTING.

	For one pixel on-off dashed lines, use PS_ALTERNATE, it seems to
	work better than PS_USERSTYLE. For other dashed lines, use
	PS_USERSTYLE and the dashes as set by the user (or the default
	four-pixel on-off style).

	(gdk_win32_gc_values_to_win32values, gdk_win32_gc_set_dashes):
	Call fixup_pen() to do the pen settings after modifying some of
	the GDK GC attributes that affect pens.

	* gdk/win32/gdkdrawable-win32.c (render_line_horizontal,
	render_line_vertical, draw_segments): Check GdkGCWin32::line_style
	instead of the the removed pen_double_dash member. Don't use
	PATCOPY unconditionally in the PatBlt() call, use a raster ope
	code that depends on the GC function in use.

	(draw_rectangle, draw_segments, draw_lines): Be more careful in
	deciding when to do the manual dash rendering.

	(draw_segments): Don't do any manual "last point" drawing at
	all. The above changes takes care of narrow line segments being
	drawn correctly in most cases, at least on NT-based Windows.
2005-06-24 13:00:05 +00:00
..
rc Use correct DLL and import library names, with GTK_API_VERSION in name, 2003-01-05 02:24:15 +00:00
.cvsignore Remove conftest* after use along the lines of AC_TRY_COMPILE. 2000-09-05 14:07:55 +00:00
bdfcursor.c Fixes #136082 and #135265, patch by Morten Welinder. 2004-03-06 03:38:59 +00:00
gdkcolor-win32.c Print debugging output only if asked for, not always. 2005-03-16 01:38:57 +00:00
gdkcursor-win32.c gdk/win32/gdkcursor-win32.c gdk/win32/gdkwindow-win32.c Support 2005-06-04 21:43:03 +00:00
gdkdisplay-win32.c New debugging function, to log a clipboard format name symbolically. 2005-04-04 00:12:26 +00:00
gdkdnd-win32.c Set the actions and suggested_action fields in the GdkDragContext to 2005-06-17 19:41:01 +00:00
gdkdrawable-win32.c Improve and simplify line segment rendering on Win32, especially the 2005-06-24 13:00:05 +00:00
gdkdrawable-win32.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkevents-win32.c gdk/win32/gdkevents-win32.c gdk/win32/gdkkeys-win32.c Check the 2005-05-18 14:53:00 +00:00
gdkfont-win32.c Match character height instead of cell height. Fix #301228. 2005-04-21 10:39:39 +00:00
gdkgc-win32.c Improve and simplify line segment rendering on Win32, especially the 2005-06-24 13:00:05 +00:00
gdkgeometry-win32.c Print debugging output only if asked for, not always. 2005-03-16 01:38:57 +00:00
gdkglobals-win32.c New debugging function, to log a clipboard format name symbolically. 2005-04-04 00:12:26 +00:00
gdkim-win32.c On WM_MOUSEMOVE, don't check if this process owns the active window. This 2005-03-18 10:21:51 +00:00
gdkimage-win32.c Fixes #136082 and #135265, patch by Morten Welinder. 2004-03-06 03:38:59 +00:00
gdkinput-win32.c gdk/win32/gdkprivate-win32.h Drop global variable _gdk_root_window, just 2005-03-16 02:21:14 +00:00
gdkinput-win32.h Implement better handling of Wintab tablet context overlap on Win32. 2005-02-25 00:12:32 +00:00
gdkinput.c Implement lazy extended input initialization on Win32, by Robert Ögren. 2005-02-02 18:11:17 +00:00
gdkkeys-win32.c Map VK_APPS to GDK_Menu. (#172383, Ivan Wong) 2005-05-22 22:28:39 +00:00
gdkmain-win32.c New debugging function, to log a clipboard format name symbolically. 2005-04-04 00:12:26 +00:00
gdkpixmap-win32.c Use cairo_set_device_offset(). 2005-03-18 01:23:23 +00:00
gdkpixmap-win32.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkprivate-win32.h Improve and simplify line segment rendering on Win32, especially the 2005-06-24 13:00:05 +00:00
gdkproperty-win32.c Handle gtk-alternative-button-order (setting it to TRUE). 2005-05-24 17:49:15 +00:00
gdkscreen-win32.c Return NULL unless screen number is zero. We have only one screen on 2005-06-05 10:34:20 +00:00
gdkselection-win32.c Fix #300218: 2005-04-11 18:59:05 +00:00
gdkspawn-win32.c workaround for bug #137496, the real fix would involve just another small 2004-04-11 15:25:06 +00:00
gdkvisual-win32.c Handle 16 colour display mode. For some reason, in this mode 2005-04-05 01:46:59 +00:00
gdkwin32.h New debugging function, to log a clipboard format name symbolically. 2005-04-04 00:12:26 +00:00
gdkwin32id.c Fixes #136082 and #135265, patch by Morten Welinder. 2004-03-06 03:38:59 +00:00
gdkwindow-win32.c gdk/win32/gdkcursor-win32.c gdk/win32/gdkwindow-win32.c Support 2005-06-04 21:43:03 +00:00
gdkwindow-win32.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
libie55uuid.la Add headers. Add section about ActiveIMM. 2001-11-08 20:57:18 +00:00
libwntab32x.la Add headers. Add section about ActiveIMM. 2001-11-08 20:57:18 +00:00
Makefile.am Use cairo_set_device_offset(). 2005-03-18 01:23:23 +00:00
makefile.msc [merged from gtk-2-6 branch] let dash_offset shift the start of the line 2005-04-03 21:03:08 +00:00
xcursors.h Update. Mention the gtk-1-3-win32-production branch. 2001-02-23 03:51:41 +00:00