summaryrefslogtreecommitdiff
path: root/include/libnsfb_plot.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libnsfb_plot.h')
-rw-r--r--include/libnsfb_plot.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/libnsfb_plot.h b/include/libnsfb_plot.h
index ef53934..af1768e 100644
--- a/include/libnsfb_plot.h
+++ b/include/libnsfb_plot.h
@@ -45,6 +45,20 @@ typedef struct nsfb_plot_pen_s {
nsfb_colour_t fill_colour; /**< Colour of fill */
} nsfb_plot_pen_t;
+/** path operation type. */
+typedef enum nsfb_plot_pathop_type_e {
+ NFSB_PLOT_PATHOP_MOVE,
+ NFSB_PLOT_PATHOP_LINE,
+ NFSB_PLOT_PATHOP_QUAD,
+ NFSB_PLOT_PATHOP_CUBIC,
+} nsfb_plot_pathop_type_t;
+
+/** path element */
+typedef struct nsfb_plot_pathop_s {
+ nsfb_plot_pathop_type_t operation;
+ nsfb_point_t point;
+} nsfb_plot_pathop_t;
+
/** Sets a clip rectangle for subsequent plots.
*
* Sets a clipping area which constrains all subsequent plotting operations.
@@ -122,6 +136,8 @@ bool nsfb_plot_cubic_bezier(nsfb_t *nsfb, nsfb_bbox_t *curve, nsfb_point_t *ctrl
bool nsfb_plot_quadratic_bezier(nsfb_t *nsfb, nsfb_bbox_t *curve, nsfb_point_t *ctrla, nsfb_colour_t cl);
+bool nsfb_plot_path(nsfb_t *nsfb, int pathc, nsfb_plot_pathop_t *pathop, nsfb_plot_pen_t *pen);
+
/** copy an area of screen
*
* Copy an area of the display.