summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-04-08 21:39:21 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-04-08 21:39:21 +0000
commit762784c01baec27dffcf1437b2427a45d82a59de (patch)
treebc3231dbb7166448d16785c6d543808d8f4ee8a8 /include
parent08bf9ed1ac868954feefdc812204fd6a4d4767e7 (diff)
downloadlibnsfb-762784c01baec27dffcf1437b2427a45d82a59de.tar.gz
libnsfb-762784c01baec27dffcf1437b2427a45d82a59de.tar.bz2
add font glyph plotting support
svn path=/trunk/libnsfb/; revision=7068
Diffstat (limited to 'include')
-rw-r--r--include/libnsfb_plot.h11
-rw-r--r--include/nsfb_plot.h15
2 files changed, 24 insertions, 2 deletions
diff --git a/include/libnsfb_plot.h b/include/libnsfb_plot.h
index 64aa729..2b19b52 100644
--- a/include/libnsfb_plot.h
+++ b/include/libnsfb_plot.h
@@ -69,4 +69,13 @@ bool nsfb_plot_copy(nsfb_t *nsfb, int srcx, int srcy, int width, int height, int
/** Plot bitmap.
*/
-bool nsfb_plot_bitmap(nsfb_t *nsfb, nsfb_bbox_t *loc, nsfb_colour_t *pixel, int bmp_width, int bmp_height, int bmp_stride, bool alpha);
+bool nsfb_plot_bitmap(nsfb_t *nsfb, nsfb_bbox_t *loc, const nsfb_colour_t *pixel, int bmp_width, int bmp_height, int bmp_stride, bool alpha);
+
+/** Plot an 8 bit glyph.
+ */
+bool nsfb_plot_glyph8(nsfb_t *nsfb, nsfb_bbox_t *loc, const uint8_t *pixel, int pitch, nsfb_colour_t c);
+
+
+/** Plot an 1 bit glyph.
+ */
+bool nsfb_plot_glyph1(nsfb_t *nsfb, nsfb_bbox_t *loc, const uint8_t *pixel, int pitch, nsfb_colour_t c);
diff --git a/include/nsfb_plot.h b/include/nsfb_plot.h
index 2dbd22a..02da331 100644
--- a/include/nsfb_plot.h
+++ b/include/nsfb_plot.h
@@ -60,7 +60,7 @@ typedef bool (nsfb_plotfn_ellipse_fill_t)(nsfb_t *nsfb, nsfb_bbox_t *ellipse, ns
/** Plot bitmap
*/
-typedef bool (nsfb_plotfn_bitmap_t)(nsfb_t *nsfb, nsfb_bbox_t *loc, nsfb_colour_t *pixel, int bmp_width, int bmp_height, int bmp_stride, bool alpha);
+typedef bool (nsfb_plotfn_bitmap_t)(nsfb_t *nsfb, nsfb_bbox_t *loc, const nsfb_colour_t *pixel, int bmp_width, int bmp_height, int bmp_stride, bool alpha);
/** Copy an area of screen
@@ -69,6 +69,17 @@ typedef bool (nsfb_plotfn_bitmap_t)(nsfb_t *nsfb, nsfb_bbox_t *loc, nsfb_colour
*/
typedef bool (nsfb_plotfn_copy_t)(nsfb_t *nsfb, int srcx, int srcy, int width, int height, int dstx, int dsty);
+
+/** Plot an 8 bit glyph.
+ */
+typedef bool (nsfb_plotfn_glyph8_t)(nsfb_t *nsfb, nsfb_bbox_t *loc, const uint8_t *pixel, int pitch, nsfb_colour_t c);
+
+
+/** Plot an 1 bit glyph.
+ */
+typedef bool (nsfb_plotfn_glyph1_t)(nsfb_t *nsfb, nsfb_bbox_t *loc, const uint8_t *pixel, int pitch, nsfb_colour_t c);
+
+
/** plotter function table. */
typedef struct nsfb_plotter_fns_s {
nsfb_plotfn_clg_t *clg;
@@ -83,6 +94,8 @@ typedef struct nsfb_plotter_fns_s {
nsfb_plotfn_bitmap_t *bitmap;
nsfb_plotfn_point_t *point;
nsfb_plotfn_copy_t *copy;
+ nsfb_plotfn_glyph8_t *glyph8;
+ nsfb_plotfn_glyph1_t *glyph1;
} nsfb_plotter_fns_t;