summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkdrawable-win32.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-07-11 21:42:15 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-07-11 21:42:15 +0000
commit2823963703949ac3f5358188f2e053d72813701a (patch)
treee4123a6946499c14e44e467c0b31981f8524492c /gdk/win32/gdkdrawable-win32.c
parent5fc106081f0649f770f7ff94359a3d571e45384c (diff)
downloadgtk+-2823963703949ac3f5358188f2e053d72813701a.tar.gz
Win32 changes, still doesn't build though.
2000-07-12 Tor Lillqvist <tml@iki.fi> Win32 changes, still doesn't build though. * gdk/makefile.cygwin * gdk/win32/makefile.cygwin * gtk/makefile.cygwin: Updates. * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same default values for fg and bg pixel as X11 does (0 and 1), not black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default. Use 0 for pen width by default (treated as 1 anyway later, but for apps that might check the value in the GdkGC). (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public interface to gdk_gc_predraw and _postdraw. * gdk/win32/gdkwin32.h * gdk/gdk.def: Add gdk_win32_hdc_{get,release}. * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove extraneous semicolon. * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0. * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth, not the Win32 bitspixel value.
Diffstat (limited to 'gdk/win32/gdkdrawable-win32.c')
-rw-r--r--gdk/win32/gdkdrawable-win32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index 4d950f47b7..37abf2db75 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -791,7 +791,7 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
WIN32_GDI_FAILED ("LineTo"), ok = FALSE;
/* Draw end pixel */
- if (ok && gc_data->pen_width == 1)
+ if (ok && gc_data->pen_width <= 1)
if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
WIN32_GDI_FAILED ("LineTo"), ok = FALSE;
}
@@ -819,7 +819,7 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
WIN32_GDI_FAILED ("LineTo");
/* Draw end pixel */
- if (gc_data->pen_width == 1)
+ if (gc_data->pen_width <= 1)
if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
WIN32_GDI_FAILED ("LineTo");
}
@@ -859,7 +859,7 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
g_free (pts);
/* Draw end pixel */
- if (gc_data->pen_width == 1)
+ if (gc_data->pen_width <= 1)
{
MoveToEx (hdc, points[npoints-1].x, points[npoints-1].y, NULL);
if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
@@ -876,7 +876,7 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
* we draw the end pixel separately... With wider pens we don't care.
* //HB: But the NT developers don't read their API documentation ...
*/
- if (gc_data->pen_width == 1 && windows_version > 0x80000000)
+ if (gc_data->pen_width <= 1 && windows_version > 0x80000000)
if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
WIN32_GDI_FAILED ("LineTo");
#endif