From 4d9498561d4a73ffa2389e9fecd8893ff823a95c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 19 Oct 2004 08:21:10 +0200 Subject: 8-bit rendering and span scissoring --- include/fitz/pixmap.h | 2 +- include/fitz/render.h | 15 +++++++++++++++ include/fitz/scanconv.h | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) (limited to 'include/fitz') diff --git a/include/fitz/pixmap.h b/include/fitz/pixmap.h index f7bab833..24584f30 100644 --- a/include/fitz/pixmap.h +++ b/include/fitz/pixmap.h @@ -6,7 +6,7 @@ struct fz_pixmap_s int x, y, w, h; int n, a; int stride; - short *samples; + unsigned char *samples; }; fz_error *fz_newpixmap(fz_pixmap **mapp, fz_colorspace *cs, int x, int y, int w, int h, int n, int a); diff --git a/include/fitz/render.h b/include/fitz/render.h index 7f4e08db..dc2f116a 100644 --- a/include/fitz/render.h +++ b/include/fitz/render.h @@ -1,5 +1,20 @@ typedef struct fz_renderer_s fz_renderer; +enum { FZ_RNONE, FZ_ROVER, FZ_RMASK }; + +struct fz_renderer_s +{ + fz_colorspace *model; + fz_glyphcache *cache; + fz_gel *gel; + fz_ael *ael; + int mode; + int x, y, w, h; + fz_pixmap *tmp; + fz_pixmap *acc; + unsigned char r, g, b; +}; + fz_error *fz_newrenderer(fz_renderer **gcp, fz_colorspace *pcm); void fz_freerenderer(fz_renderer *gc); diff --git a/include/fitz/scanconv.h b/include/fitz/scanconv.h index a3c29473..794b9ba2 100644 --- a/include/fitz/scanconv.h +++ b/include/fitz/scanconv.h @@ -38,7 +38,7 @@ fz_error *fz_insertael(fz_ael *ael, fz_gel *gel, int y, int *e); void fz_advanceael(fz_ael *ael); void fz_freeael(fz_ael *ael); -fz_error *fz_scanconvert(fz_gel *gel, fz_ael *ael, int eofill, +fz_error *fz_scanconvert(fz_gel *gel, fz_ael *ael, int eofill, int y0, int y1, void (*blitfunc)(int,int,int,short*,void*), void *blitdata); fz_error *fz_fillpath(fz_gel *gel, fz_pathnode *path, fz_matrix ctm, float flatness); -- cgit v1.2.3