diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libnsfb_plot.h | 6 | ||||
-rw-r--r-- | include/plot.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/libnsfb_plot.h b/include/libnsfb_plot.h index af1768e..e0ee7de 100644 --- a/include/libnsfb_plot.h +++ b/include/libnsfb_plot.h @@ -101,6 +101,12 @@ bool nsfb_plot_line(nsfb_t *nsfb, nsfb_bbox_t *line, nsfb_plot_pen_t *pen); */ bool nsfb_plot_lines(nsfb_t *nsfb, int linec, nsfb_bbox_t *line, nsfb_plot_pen_t *pen); +/** Plots a number of connected lines. + * + * Draw a series of connected lines. + */ +bool nsfb_plot_polylines(nsfb_t *nsfb, int pointc, nsfb_point_t *points, nsfb_plot_pen_t *pen); + /** Plots a filled polygon. * * Plots a filled polygon with straight lines between points. The lines around diff --git a/include/plot.h b/include/plot.h index 8894c7a..929daec 100644 --- a/include/plot.h +++ b/include/plot.h @@ -90,6 +90,8 @@ typedef bool (nsfb_plotfn_quadratic_bezier_t)(nsfb_t *nsfb, nsfb_bbox_t *curve, */ typedef bool (nsfb_plotfn_cubic_bezier_t)(nsfb_t *nsfb, nsfb_bbox_t *curve, nsfb_point_t *ctrla, nsfb_point_t *ctrlb, nsfb_colour_t c); +typedef bool (nsfb_plotfn_polylines_t)(nsfb_t *nsfb, int pointc, nsfb_point_t *points, nsfb_plot_pen_t *pen); + /** plot path */ typedef bool (nsfb_plotfn_path_t)(nsfb_t *nsfb, int pathc, nsfb_plot_pathop_t *pathop, nsfb_plot_pen_t *pen); @@ -114,6 +116,7 @@ typedef struct nsfb_plotter_fns_s { nsfb_plotfn_quadratic_bezier_t *quadratic; nsfb_plotfn_cubic_bezier_t *cubic; nsfb_plotfn_path_t *path; + nsfb_plotfn_polylines_t *polylines; } nsfb_plotter_fns_t; |