summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-01-11 23:39:54 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-01-11 23:39:54 +0000
commita3097232844a20ea918d63722dbe6a7c71493bab (patch)
tree484422f361244027b1b4bc7f402bf232513dda54 /include
parentda9f17aa78b7b41424a546a2cf8b2a785f9a030f (diff)
downloadlibnsfb-a3097232844a20ea918d63722dbe6a7c71493bab.tar.gz
libnsfb-a3097232844a20ea918d63722dbe6a7c71493bab.tar.bz2
simplify internal headers
svn path=/trunk/libnsfb/; revision=9801
Diffstat (limited to 'include')
-rw-r--r--include/libnsfb_plot.h16
-rw-r--r--include/plot.h (renamed from include/nsfb_plot.h)6
-rw-r--r--include/plotters.h1
3 files changed, 22 insertions, 1 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.
diff --git a/include/nsfb_plot.h b/include/plot.h
index 8b39cc5..8894c7a 100644
--- a/include/nsfb_plot.h
+++ b/include/plot.h
@@ -90,6 +90,9 @@ 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);
+/** plot path */
+typedef bool (nsfb_plotfn_path_t)(nsfb_t *nsfb, int pathc, nsfb_plot_pathop_t *pathop, nsfb_plot_pen_t *pen);
+
/** plotter function table. */
typedef struct nsfb_plotter_fns_s {
nsfb_plotfn_clg_t *clg;
@@ -110,6 +113,9 @@ typedef struct nsfb_plotter_fns_s {
nsfb_plotfn_readrect_t *readrect;
nsfb_plotfn_quadratic_bezier_t *quadratic;
nsfb_plotfn_cubic_bezier_t *cubic;
+ nsfb_plotfn_path_t *path;
} nsfb_plotter_fns_t;
+bool select_plotters(nsfb_t *nsfb);
+
diff --git a/include/plotters.h b/include/plotters.h
deleted file mode 100644
index dc4648b..0000000
--- a/include/plotters.h
+++ /dev/null
@@ -1 +0,0 @@
-bool select_plotters(nsfb_t *nsfb);