From 90326e6b0d35ac8ca81f40cc36a252a6ecd916d4 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 21 Jan 2010 23:35:35 +0000 Subject: fix polylines svn path=/trunk/libnsfb/; revision=9855 --- src/plot/generic.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plot') diff --git a/src/plot/generic.c b/src/plot/generic.c index 8dbc64b..a367d14 100644 --- a/src/plot/generic.c +++ b/src/plot/generic.c @@ -604,13 +604,16 @@ static bool quadratic(nsfb_t *nsfb, nsfb_bbox_t *curve, nsfb_point_t *ctrla, nsf return true; } -static bool polylines(nsfb_t *nsfb, int pointc, nsfb_point_t *points, nsfb_plot_pen_t *pen) + +static bool polylines(nsfb_t *nsfb, int pointc, const nsfb_point_t *points, nsfb_plot_pen_t *pen) { int point_loop; + nsfb_bbox_t line; if (pen->stroke_type != NFSB_PLOT_OPTYPE_NONE) { for (point_loop = 0; point_loop < (pointc - 1); point_loop++) { - nsfb->plotter_fns->line(nsfb, 1, (nsfb_bbox_t *)&points[point_loop], pen); + line = *(nsfb_bbox_t *)&points[point_loop]; + nsfb->plotter_fns->line(nsfb, 1, &line, pen); } } return true; -- cgit v1.2.3