diff options
Diffstat (limited to 'include/fitz')
-rw-r--r-- | include/fitz/colorspace.h | 15 | ||||
-rw-r--r-- | include/fitz/font.h | 4 | ||||
-rw-r--r-- | include/fitz/pixmap.h | 6 | ||||
-rw-r--r-- | include/fitz/render.h | 2 | ||||
-rw-r--r-- | include/fitz/tree.h | 12 |
5 files changed, 27 insertions, 12 deletions
diff --git a/include/fitz/colorspace.h b/include/fitz/colorspace.h new file mode 100644 index 00000000..370c755f --- /dev/null +++ b/include/fitz/colorspace.h @@ -0,0 +1,15 @@ +typedef struct fz_colorspace_s fz_colorspace; + +struct fz_colorspace_s +{ + char name[16]; + int frozen; + int n; + void (*toxyz)(fz_colorspace *, float *src, float *xyz); + void (*fromxyz)(fz_colorspace *, float *xyz, float *dst); + void (*free)(fz_colorspace *); +}; + +void fz_freecolorspace(fz_colorspace *cs); +void fz_convertcolor(fz_colorspace *srcs, float *srcv, fz_colorspace *dsts, float *dstv); + diff --git a/include/fitz/font.h b/include/fitz/font.h index b915755b..d64c1fc3 100644 --- a/include/fitz/font.h +++ b/include/fitz/font.h @@ -37,9 +37,6 @@ struct fz_font_s int nvmtx, vmtxcap; fz_vmtx dvmtx; fz_vmtx *vmtx; - - int ncidtogid; - unsigned short *cidtogid; }; struct fz_glyph_s @@ -53,7 +50,6 @@ void fz_freefont(fz_font *font); void fz_debugfont(fz_font *font); void fz_setfontwmode(fz_font *font, int wmode); void fz_setfontbbox(fz_font *font, int xmin, int ymin, int xmax, int ymax); -void fz_setcidtogid(fz_font *font, int n, unsigned short *map); void fz_setdefaulthmtx(fz_font *font, int w); void fz_setdefaultvmtx(fz_font *font, int y, int w); fz_error *fz_addhmtx(fz_font *font, int lo, int hi, int w); diff --git a/include/fitz/pixmap.h b/include/fitz/pixmap.h index 462b4ad6..f7bab833 100644 --- a/include/fitz/pixmap.h +++ b/include/fitz/pixmap.h @@ -1,16 +1,16 @@ typedef struct fz_pixmap_s fz_pixmap; -typedef struct fz_colorspace_s fz_colorspace; struct fz_pixmap_s { + fz_colorspace *cs; int x, y, w, h; int n, a; int stride; - fz_colorspace *cs; short *samples; }; -fz_error *fz_newpixmap(fz_pixmap **mapp, int x, int y, int w, int h, int n, int a); +fz_error *fz_newpixmap(fz_pixmap **mapp, fz_colorspace *cs, int x, int y, int w, int h, int n, int a); +fz_error *fz_convertpixmap(fz_pixmap **dstp, fz_pixmap *src, fz_colorspace *dstcs); void fz_debugpixmap(fz_pixmap *map); void fz_freepixmap(fz_pixmap *map); void fz_clearpixmap(fz_pixmap *map); diff --git a/include/fitz/render.h b/include/fitz/render.h index 09c439c2..7f4e08db 100644 --- a/include/fitz/render.h +++ b/include/fitz/render.h @@ -1,6 +1,6 @@ typedef struct fz_renderer_s fz_renderer; -fz_error *fz_newrenderer(fz_renderer **gcp); +fz_error *fz_newrenderer(fz_renderer **gcp, fz_colorspace *pcm); void fz_freerenderer(fz_renderer *gc); fz_error *fz_renderover(fz_renderer *gc, fz_overnode *over, fz_matrix ctm); diff --git a/include/fitz/tree.h b/include/fitz/tree.h index 4d6eb952..6578ab51 100644 --- a/include/fitz/tree.h +++ b/include/fitz/tree.h @@ -102,6 +102,7 @@ struct fz_masknode_s struct fz_blendnode_s { fz_node super; + fz_colorspace *cs; fz_blendkind mode; int isolated; int knockout; @@ -110,7 +111,9 @@ struct fz_blendnode_s struct fz_colornode_s { fz_node super; - float r, g, b; + fz_colorspace *cs; + int n; + float samples[]; }; struct fz_linknode_s @@ -128,6 +131,7 @@ struct fz_metanode_s struct fz_imagenode_s { fz_node super; + fz_colorspace *cs; int w, h, n, a; // XXX fz_image *image; }; @@ -141,7 +145,7 @@ void fz_freenode(fz_node *node); fz_error *fz_newmetanode(fz_node **nodep, fz_obj *info); fz_error *fz_newovernode(fz_node **nodep); fz_error *fz_newmasknode(fz_node **nodep); -fz_error *fz_newblendnode(fz_node **nodep, fz_blendkind b, int k, int i); +fz_error *fz_newblendnode(fz_node **nodep, fz_colorspace *cs, fz_blendkind b, int k, int i); fz_error *fz_newtransformnode(fz_node **nodep, fz_matrix m); int fz_istransformnode(fz_node *node); @@ -152,8 +156,8 @@ int fz_ismetanode(fz_node *node); /* leaf nodes */ fz_error *fz_newlinknode(fz_node **nodep, fz_tree *subtree); -fz_error *fz_newcolornode(fz_node **nodep, float r, float g, float b); -fz_error *fz_newimagenode(fz_node **nodep, int w, int h, int n, int a); +fz_error *fz_newcolornode(fz_node **nodep, fz_colorspace *cs, int n, float *v); +fz_error *fz_newimagenode(fz_node **nodep, fz_colorspace *cs, int w, int h, int n, int a); int fz_islinknode(fz_node *node); int fz_iscolornode(fz_node *node); |