+2006-03-11 Tor Lillqvist <tml@novell.com>
+
+ * gdk/win32/gdkdrawable-win32.c (draw_polygon): Use Polygon() for
+ outlined polygons, too. Same idea as in draw_rectangle(): Set pen
+ to NULL_PEN if drawing a filled polygon, set brush to HOLLOW_BRUSH
+ if drawing a polygon outline. (#332662)
+ (gdk_win32_draw_polygon): Corresponding simplification: no need to
+ add an extra final copy of the starting point.
+
2006-03-11 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows: Speed up the Windows theme
+2006-03-11 Tor Lillqvist <tml@novell.com>
+
+ * gdk/win32/gdkdrawable-win32.c (draw_polygon): Use Polygon() for
+ outlined polygons, too. Same idea as in draw_rectangle(): Set pen
+ to NULL_PEN if drawing a filled polygon, set brush to HOLLOW_BRUSH
+ if drawing a polygon outline. (#332662)
+ (gdk_win32_draw_polygon): Corresponding simplification: no need to
+ add an extra final copy of the starting point.
+
2006-03-11 Dom Lachowicz <cinamod@hotmail.com>
* modules/engines/ms-windows: Speed up the Windows theme
{
gboolean filled;
POINT *pts;
- HPEN old_pen;
+ HGDIOBJ old_pen_or_brush;
gint npoints;
gint i;
}
if (filled)
- {
- old_pen = SelectObject (hdc, GetStockObject (NULL_PEN));
- if (old_pen == NULL)
- WIN32_GDI_FAILED ("SelectObject");
- GDI_CALL (Polygon, (hdc, pts, npoints));
- if (old_pen != NULL)
- GDI_CALL (SelectObject, (hdc, old_pen));
- }
+ old_pen_or_brush = SelectObject (hdc, GetStockObject (NULL_PEN));
else
- GDI_CALL (Polyline, (hdc, pts, npoints));
+ old_pen_or_brush = SelectObject (hdc, GetStockObject (HOLLOW_BRUSH));
+ if (old_pen_or_brush == NULL)
+ WIN32_GDI_FAILED ("SelectObject");
+ GDI_CALL (Polygon, (hdc, pts, npoints));
+ if (old_pen_or_brush != NULL)
+ GDI_CALL (SelectObject, (hdc, old_pen_or_brush));
}
static void
bounds.width = 0;
bounds.height = 0;
- pts = g_new (POINT, npoints+1);
+ pts = g_new (POINT, npoints);
for (i = 0; i < npoints; i++)
{
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)
- {
- pts[npoints].x = points[0].x;
- pts[npoints].y = points[0].y;
- npoints++;
- }
-
region = widen_bounds (&bounds, GDK_GC_WIN32 (gc)->pen_width);
generic_draw (drawable, gc,