Backed out change to close polygons since it caused problems for the

Sat Jan 31 00:13:33 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkstyle.c: Backed out change to close polygons
	  since it caused problems for the Notebook.
This commit is contained in:
Owen Taylor 1998-01-31 05:12:37 +00:00 committed by Owen Taylor
parent b38b6f5f0f
commit 4ef94fd74e
8 changed files with 44 additions and 17 deletions

View File

@ -1,3 +1,8 @@
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:

View File

@ -1,3 +1,8 @@
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:

View File

@ -1,3 +1,8 @@
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:

View File

@ -1,3 +1,8 @@
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:

View File

@ -1,3 +1,8 @@
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:

View File

@ -1,3 +1,8 @@
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:

View File

@ -1,3 +1,8 @@
Sat Jan 31 00:13:33 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkstyle.c: Backed out change to close polygons
since it caused problems for the Notebook.
Fri Jan 30 22:28:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkclist.{c,h}:

View File

@ -1186,27 +1186,19 @@ gtk_default_draw_polygon (GtkStyle *style,
if (fill)
gdk_draw_polygon (window, style->bg_gc[state_type], TRUE, points, npoints);
/* Check if polygon is closed */
if ((points[0].x == points[npoints-1].x) &&
(points[0].y == points[npoints-1].y))
npoints--;
npoints--;
for (i = 0; i < npoints; i++)
{
GdkPoint *next;
next = (i == npoints-1) ? &points[0] : &points[i+1];
if ((points[i].x == next->x) &&
(points[i].y == next->y))
if ((points[i].x == points[i+1].x) &&
(points[i].y == points[i+1].y))
{
angle = 0;
}
else
{
angle = atan2 (next->y - points[i].y,
next->x - points[i].x);
angle = atan2 (points[i+1].y - points[i].y,
points[i+1].x - points[i].x);
}
if ((angle > -pi_3_over_4) && (angle < pi_over_4))
@ -1224,10 +1216,10 @@ gtk_default_draw_polygon (GtkStyle *style,
gdk_draw_line (window, gc1,
points[i].x-xadjust, points[i].y-yadjust,
next->x-xadjust, next->y-yadjust);
points[i+1].x-xadjust, points[i+1].y-yadjust);
gdk_draw_line (window, gc3,
points[i].x, points[i].y,
next->x, next->y);
points[i+1].x, points[i+1].y);
}
else
{
@ -1244,10 +1236,10 @@ gtk_default_draw_polygon (GtkStyle *style,
gdk_draw_line (window, gc4,
points[i].x+xadjust, points[i].y+yadjust,
next->x+xadjust, next->y+yadjust);
points[i+1].x+xadjust, points[i+1].y+yadjust);
gdk_draw_line (window, gc2,
points[i].x, points[i].y,
next->x, next->y);
points[i+1].x, points[i+1].y);
}
}
}