From: Bartosz Kosiorek gang65@poczta.onet.pl
--- dlls/gdiplus/graphicspath.c | 66 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 5ddd96778db..c65dc19de5b 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1982,6 +1982,39 @@ static void widen_cap(const GpPointF *endpoint, const GpPointF *nextpoint, } }
+static void widen_open_figure(const GpPointF *points, int start, int end, + GpPen *pen, REAL pen_width, GpLineCap start_cap, + GpLineCap end_cap, path_list_node_t **last_point) +{ + int i; + path_list_node_t *prev_point; + + if (end <= start || pen_width == 0.0) + return; + + prev_point = *last_point; + + widen_cap(&points[start], &points[start+1], + pen_width, start_cap, FALSE, TRUE, last_point); + + for (i=start+1; i<end; i++) + widen_joint(&points[i-1], &points[i], &points[i+1], + pen, pen_width, last_point); + + widen_cap(&points[end], &points[end-1], + pen_width, end_cap, TRUE, TRUE, last_point); + + for (i=end-1; i>start; i--) + widen_joint(&points[i+1], &points[i], &points[i-1], + pen, pen_width, last_point); + + widen_cap(&points[start], &points[start+1], + pen_width, start_cap, TRUE, FALSE, last_point); + + prev_point->next->type = PathPointTypeStart; + (*last_point)->type |= PathPointTypeCloseSubpath; +} + static void add_anchor(const GpPointF *endpoint, const GpPointF *nextpoint, REAL pen_width, GpLineCap cap, GpCustomLineCap *custom, path_list_node_t **last_point) { @@ -2096,39 +2129,6 @@ static void add_anchor(const GpPointF *endpoint, const GpPointF *nextpoint, (*last_point)->type |= PathPointTypeCloseSubpath; }
-static void widen_open_figure(const GpPointF *points, int start, int end, - GpPen *pen, REAL pen_width, GpLineCap start_cap, - GpLineCap end_cap, path_list_node_t **last_point) -{ - int i; - path_list_node_t *prev_point; - - if (end <= start || pen_width == 0.0) - return; - - prev_point = *last_point; - - widen_cap(&points[start], &points[start+1], - pen_width, start_cap, FALSE, TRUE, last_point); - - for (i=start+1; i<end; i++) - widen_joint(&points[i-1], &points[i], &points[i+1], - pen, pen_width, last_point); - - widen_cap(&points[end], &points[end-1], - pen_width, end_cap, TRUE, TRUE, last_point); - - for (i=end-1; i>start; i--) - widen_joint(&points[i+1], &points[i], &points[i-1], - pen, pen_width, last_point); - - widen_cap(&points[start], &points[start+1], - pen_width, start_cap, TRUE, FALSE, last_point); - - prev_point->next->type = PathPointTypeStart; - (*last_point)->type |= PathPointTypeCloseSubpath; -} - static void widen_closed_figure(GpPath *path, int start, int end, GpPen *pen, REAL pen_width, path_list_node_t **last_point) {