diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-04-19 21:47:23 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-04-19 21:47:23 +0200 |
commit | 186b2c2e36710b5cb9721520f1abd7f3bb8d2aa3 (patch) | |
tree | f8fbff2714dd2badfebcc7f625e2dc161cd9810d /fitz/dev_trace.c | |
parent | 1d2fa92851c8e5ed90279098b81ce2a43add9f68 (diff) | |
download | mupdf-186b2c2e36710b5cb9721520f1abd7f3bb8d2aa3.tar.xz |
Add support for patterns in stroked paths and text.
Diffstat (limited to 'fitz/dev_trace.c')
-rw-r--r-- | fitz/dev_trace.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fitz/dev_trace.c b/fitz/dev_trace.c index 2a477709..751b94bb 100644 --- a/fitz/dev_trace.c +++ b/fitz/dev_trace.c @@ -119,6 +119,21 @@ fz_traceclippath(void *user, fz_path *path, fz_matrix ctm) } static void +fz_traceclipstrokepath(void *user, fz_path *path, fz_matrix ctm) +{ + printf("<gsave>\n"); + printf("<clipstrokepath "); + if (path->evenodd) + printf("winding=\"eofill\" "); + else + printf("winding=\"nonzero\" "); + fz_tracematrix(ctm); + printf(">\n"); + fz_tracepath(path, 0); + printf("</clipstrokepath>\n"); +} + +static void fz_tracefilltext(void *user, fz_text *text, fz_matrix ctm, fz_colorspace *colorspace, float *color, float alpha) { @@ -154,6 +169,17 @@ fz_tracecliptext(void *user, fz_text *text, fz_matrix ctm) } static void +fz_traceclipstroketext(void *user, fz_text *text, fz_matrix ctm) +{ + printf("<gsave>\n"); + printf("<clipstroketext font=\"%s\" ", text->font->name); + fz_tracematrix(fz_concat(ctm, text->trm)); + printf(">\n"); + fz_debugtext(text, 0); + printf("</clipstroketext>\n"); +} + +static void fz_traceignoretext(void *user, fz_text *text, fz_matrix ctm) { printf("<ignoretext font=\"%s\" ", text->font->name); @@ -211,10 +237,12 @@ fz_device *fz_newtracedevice(void) dev->fillpath = fz_tracefillpath; dev->strokepath = fz_tracestrokepath; dev->clippath = fz_traceclippath; + dev->clipstrokepath = fz_traceclipstrokepath; dev->filltext = fz_tracefilltext; dev->stroketext = fz_tracestroketext; dev->cliptext = fz_tracecliptext; + dev->clipstroketext = fz_traceclipstroketext; dev->ignoretext = fz_traceignoretext; dev->fillshade = fz_tracefillshade; |