Commit aac21b6f authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

We can calculate the width and height of the bounding rectangle only after

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.
parent 44f044e6
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.
......
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.
......
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.
......
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.
......
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.
......
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment