diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 9 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 9 | ||||
-rw-r--r-- | gdk/win32/gdkdrawable-win32.c | 20 |
6 files changed, 61 insertions, 4 deletions
@@ -1,3 +1,12 @@ +2003-07-04 Tor Lillqvist <tml@iki.fi> + + * gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_polygon, + gdk_win32_draw_segments, gdk_win32_draw_lines): We can calculate + the width and height of the bounding rectangle only after the + minumum x and y have been found, and need a separate loop for + it. Thanks to Bruce Hochstetler for providing a sample program + exhibiting the bug. + 2003-07-03 Tor Lillqvist <tml@iki.fi> * gdk/gdk.def: Add gdk_string_to_compound_text_for_display. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f72a6b0d0c..9edca8fc4e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2003-07-04 Tor Lillqvist <tml@iki.fi> + + * gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_polygon, + gdk_win32_draw_segments, gdk_win32_draw_lines): We can calculate + the width and height of the bounding rectangle only after the + minumum x and y have been found, and need a separate loop for + it. Thanks to Bruce Hochstetler for providing a sample program + exhibiting the bug. + 2003-07-03 Tor Lillqvist <tml@iki.fi> * gdk/gdk.def: Add gdk_string_to_compound_text_for_display. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f72a6b0d0c..9edca8fc4e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +2003-07-04 Tor Lillqvist <tml@iki.fi> + + * gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_polygon, + gdk_win32_draw_segments, gdk_win32_draw_lines): We can calculate + the width and height of the bounding rectangle only after the + minumum x and y have been found, and need a separate loop for + it. Thanks to Bruce Hochstetler for providing a sample program + exhibiting the bug. + 2003-07-03 Tor Lillqvist <tml@iki.fi> * gdk/gdk.def: Add gdk_string_to_compound_text_for_display. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f72a6b0d0c..9edca8fc4e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2003-07-04 Tor Lillqvist <tml@iki.fi> + + * gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_polygon, + gdk_win32_draw_segments, gdk_win32_draw_lines): We can calculate + the width and height of the bounding rectangle only after the + minumum x and y have been found, and need a separate loop for + it. Thanks to Bruce Hochstetler for providing a sample program + exhibiting the bug. + 2003-07-03 Tor Lillqvist <tml@iki.fi> * gdk/gdk.def: Add gdk_string_to_compound_text_for_display. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f72a6b0d0c..9edca8fc4e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2003-07-04 Tor Lillqvist <tml@iki.fi> + + * gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_polygon, + gdk_win32_draw_segments, gdk_win32_draw_lines): We can calculate + the width and height of the bounding rectangle only after the + minumum x and y have been found, and need a separate loop for + it. Thanks to Bruce Hochstetler for providing a sample program + exhibiting the bug. + 2003-07-03 Tor Lillqvist <tml@iki.fi> * gdk/gdk.def: Add gdk_string_to_compound_text_for_display. diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c index 819adf6fcc..7a86fe7a02 100644 --- a/gdk/win32/gdkdrawable-win32.c +++ b/gdk/win32/gdkdrawable-win32.c @@ -955,12 +955,16 @@ gdk_win32_draw_polygon (GdkDrawable *drawable, { bounds.x = MIN (bounds.x, points[i].x); bounds.y = MIN (bounds.y, points[i].y); - bounds.width = MAX (bounds.width, points[i].x - bounds.x); - bounds.height = MAX (bounds.height, points[i].y - bounds.y); pts[i].x = points[i].x; pts[i].y = points[i].y; } + for (i = 0; i < npoints; i++) + { + bounds.width = MAX (bounds.width, points[i].x - bounds.x); + bounds.height = MAX (bounds.height, points[i].y - bounds.y); + } + if (points[0].x != points[npoints-1].x || points[0].y != points[npoints-1].y) { @@ -1250,6 +1254,10 @@ gdk_win32_draw_segments (GdkDrawable *drawable, bounds.x = MIN (bounds.x, segs[i].x2); bounds.y = MIN (bounds.y, segs[i].y1); bounds.y = MIN (bounds.y, segs[i].y2); + } + + for (i = 0; i < nsegs; i++) + { bounds.width = MAX (bounds.width, segs[i].x1 - bounds.x); bounds.width = MAX (bounds.width, segs[i].x2 - bounds.x); bounds.height = MAX (bounds.height, segs[i].y1 - bounds.y); @@ -1353,12 +1361,16 @@ gdk_win32_draw_lines (GdkDrawable *drawable, { bounds.x = MIN (bounds.x, points[i].x); bounds.y = MIN (bounds.y, points[i].y); - bounds.width = MAX (bounds.width, points[i].x - bounds.x); - bounds.height = MAX (bounds.height, points[i].y - bounds.y); pts[i].x = points[i].x; pts[i].y = points[i].y; } + for (i = 0; i < npoints; i++) + { + bounds.width = MAX (bounds.width, points[i].x - bounds.x); + bounds.height = MAX (bounds.height, points[i].y - bounds.y); + } + region = widen_bounds (&bounds, GDK_GC_WIN32 (gc)->pen_width); generic_draw (drawable, gc, GDK_GC_FOREGROUND|LINE_ATTRIBUTES, |