summaryrefslogtreecommitdiff
path: root/fitz/fitz.h
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2011-07-29 19:11:53 +0100
committerRobin Watts <Robin.Watts@artifex.com>2011-08-01 14:11:53 +0100
commit5a46065a0df691a79b75f5e61e34e344afd5349a (patch)
tree3a4f175c73fbb945a4df3d1abcd822a5571641b5 /fitz/fitz.h
parent684cd3ebbbeaffbf416a09aad6af2cb160cec6bb (diff)
downloadmupdf-5a46065a0df691a79b75f5e61e34e344afd5349a.tar.xz
Add support for colored Type3 glyphs (ones that use d0).
Detect the d0 or d1 operators by writing a bit to the new device flags word. This can then be checked by the Type3 code to create the appropriate backing pixmap. In order to know what the appropriate backing pixmap is, we pass an additional colorspace into the glyph rendering code.
Diffstat (limited to 'fitz/fitz.h')
-rw-r--r--fitz/fitz.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 7fe8b297..cee62bc8 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -909,9 +909,9 @@ typedef struct fz_glyph_cache_s fz_glyph_cache;
fz_glyph_cache *fz_new_glyph_cache(void);
fz_pixmap *fz_render_ft_glyph(fz_font *font, int cid, fz_matrix trm);
-fz_pixmap *fz_render_t3_glyph(fz_font *font, int cid, fz_matrix trm);
+fz_pixmap *fz_render_t3_glyph(fz_font *font, int cid, fz_matrix trm, fz_colorspace *model);
fz_pixmap *fz_render_ft_stroked_glyph(fz_font *font, int gid, fz_matrix trm, fz_matrix ctm, fz_stroke_state *state);
-fz_pixmap *fz_render_glyph(fz_glyph_cache*, fz_font*, int, fz_matrix);
+fz_pixmap *fz_render_glyph(fz_glyph_cache*, fz_font*, int, fz_matrix, fz_colorspace *model);
fz_pixmap *fz_render_stroked_glyph(fz_glyph_cache*, fz_font*, int, fz_matrix, fz_matrix, fz_stroke_state *stroke);
void fz_free_glyph_cache(fz_glyph_cache *);
@@ -944,8 +944,13 @@ void fz_flatten_dash_path(fz_gel *gel, fz_path *path, fz_stroke_state *stroke, f
enum
{
+ /* Hints */
FZ_IGNORE_IMAGE = 1,
FZ_IGNORE_SHADE = 2,
+
+ /* Flags */
+ FZ_CHARPROC_MASK = 1,
+ FZ_CHARPROC_COLOR = 2,
};
typedef struct fz_device_s fz_device;
@@ -953,6 +958,7 @@ typedef struct fz_device_s fz_device;
struct fz_device_s
{
int hints;
+ int flags;
void *user;
void (*free_user)(void *);