gtk/gdk
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
..
linux-fb Fill in unused bits so they can be used for the depth-32 target case. 2005-05-09 22:54:10 +00:00
win32 Improve and simplify line segment rendering on Win32, especially the 2005-06-24 13:00:05 +00:00
x11 Set the time field in the event. (#308573, Morten Welinder) 2005-06-22 16:09:41 +00:00
.cvsignore Shut up CVS 2005-03-16 04:36:05 +00:00
abicheck.sh Make make check happier 2005-06-15 06:03:54 +00:00
COPYING [ Merges from gtk-1-2 ] 1999-09-28 20:19:13 +00:00
gdk.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdk.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdk.symbols New function which can be used to implement scrolling in non-window 2005-06-21 04:09:52 +00:00
gdkcairo.c Fix the big endian case for 3-channel source. (Reported by David Zeuthen) 2005-06-23 13:49:06 +00:00
gdkcairo.h Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to 2005-05-11 19:16:19 +00:00
gdkcolor.c Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to 2005-05-11 19:16:19 +00:00
gdkcolor.h Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to 2005-05-11 19:16:19 +00:00
gdkconfig.h.win32 Massive changes. Too many to list here, but I'll try a summary: 2002-02-17 00:25:05 +00:00
gdkcursor.c remove GDK_CURSOR and GDK_IS_CURSOR, instance checks don't work on boxed 2005-06-18 11:25:14 +00:00
gdkcursor.h remove GDK_CURSOR and GDK_IS_CURSOR, instance checks don't work on boxed 2005-06-18 11:25:14 +00:00
gdkdisplay.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkdisplay.h Remove the accidentally added prototype for this unimplemented 2005-01-23 04:26:41 +00:00
gdkdisplaymanager.c Use canonical names for g_object_notify() as well. 2005-03-26 05:49:15 +00:00
gdkdisplaymanager.h Renames: 2002-06-20 23:59:27 +00:00
gdkdnd.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkdnd.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkdraw.c gdk/gdkdraw.c #include gdkcairo.h for gdk_cairo_create() declaration. 2005-05-14 07:19:48 +00:00
gdkdrawable.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkevents.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkevents.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkfont.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkfont.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkgc.c Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to 2005-05-11 19:16:19 +00:00
gdkgc.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkglobals.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdki18n.h Deprecate GtkPreviewType, GtkSignalRunType, GtkSideType, 2002-01-30 02:01:10 +00:00
gdkimage.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkimage.h Small documentation additions. 2005-05-08 05:47:52 +00:00
gdkinput.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkinternals.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkintl.h Split the gtk translations into the domains gtk20 and gtk20-properties. 2004-01-17 22:15:58 +00:00
gdkkeynames.c gdk_key is a typedef, not a struct tag. 2005-03-17 12:05:16 +00:00
gdkkeys.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkkeys.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkkeysyms.h Add dead_hook and dead_horn. 2004-11-29 13:57:53 +00:00
gdkkeyuni.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkmarshalers.list New demo for window migration between different displays and screens. 2002-08-01 23:43:13 +00:00
gdkpango.c Fix a typo in the docs. (#303940, Masao Mutoh) 2005-05-16 19:37:34 +00:00
gdkpango.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkpixbuf-drawable.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkpixbuf-render.c Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to 2005-05-11 19:16:19 +00:00
gdkpixbuf.h Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to 2005-05-11 19:16:19 +00:00
gdkpixmap.c Switch set_cairo_target() virtual function to ref_cairo_surface() 2005-03-17 01:54:40 +00:00
gdkpixmap.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkpoly-generic.h Merge no-flicker branch into HEAD 2000-03-28 01:24:44 +00:00
gdkpolyreg-generic.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkprivate.h Make gdkx.h the only installed header from gdk/x11. All structures in 2001-09-07 21:50:20 +00:00
gdkproperty.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkrectangle.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkregion-generic.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkregion-generic.h (Part 2) Remove gdk_*_lookup() defines, since they are defined by the 2000-07-24 16:19:00 +00:00
gdkregion.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkrgb.c Fill in unused bits so they can be used for the depth-32 target case. 2005-05-09 22:54:10 +00:00
gdkrgb.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkscreen.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkscreen.h Fill in unused bits so they can be used for the depth-32 target case. 2005-05-09 22:54:10 +00:00
gdkselection.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkselection.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkspawn.h Utility functions for multi-screen applications which need to ensure 2003-12-10 13:49:58 +00:00
gdktypes.h Cleanup. (#169648, Fabricio Barros Cabral) 2005-06-12 05:32:25 +00:00
gdkvisual.c Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
gdkvisual.h Mark as const. 2004-11-28 06:45:52 +00:00
gdkwindow.c Update all fields 2005-06-16 05:18:33 +00:00
gdkwindow.h New function which can be used to implement scrolling in non-window 2005-06-21 04:09:52 +00:00
gen-keyname-table.pl Generate N_() calls for translatable key names. 2005-06-10 06:41:04 +00:00
keyname-table.h Generate N_() calls for translatable key names. 2005-06-10 06:41:04 +00:00
keynames.txt Generate N_() calls for translatable key names. 2005-06-10 06:41:04 +00:00
makeenums.pl Add GdkEventSetting event for notification of changes to system settings, 2001-04-02 23:33:47 +00:00
Makefile.am 2.7.0 2005-06-20 22:06:27 +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
makegdkalias.pl Make PLT-reduction work with gcc4, and don't include everything in 2005-03-16 03:17:27 +00:00
testgdk.c Fixes #136082 and #135265, patch by Morten Welinder. 2004-03-06 03:38:59 +00:00