diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-04-08 19:54:33 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-04-08 19:54:33 +0200 |
commit | 28bb08951bea16b4baf3b05365d606fde0a099b6 (patch) | |
tree | 1b33a686f5e6d099d58fad96da808ebc2541bc58 /fitz/res_text.c | |
parent | e32122e047e5882f3ca64d86cc0562473360b329 (diff) | |
download | mupdf-28bb08951bea16b4baf3b05365d606fde0a099b6.tar.xz |
Add display list device.
Diffstat (limited to 'fitz/res_text.c')
-rw-r--r-- | fitz/res_text.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/fitz/res_text.c b/fitz/res_text.c index a21cb3fc..798bd8a5 100644 --- a/fitz/res_text.c +++ b/fitz/res_text.c @@ -8,7 +8,6 @@ fz_newtext(fz_font *font) text = fz_malloc(sizeof(fz_text)); text->font = fz_keepfont(font); text->trm = fz_identity(); - text->ctm = fz_identity(); text->len = 0; text->cap = 0; text->els = nil; @@ -24,6 +23,22 @@ fz_freetext(fz_text *text) fz_free(text); } +fz_text * +fz_clonetext(fz_text *old) +{ + fz_text *text; + + text = fz_malloc(sizeof(fz_text)); + text->font = fz_keepfont(old->font); + text->trm = old->trm; + text->len = old->len; + text->cap = text->len; + text->els = fz_malloc(text->len * sizeof(fz_textel)); + memcpy(text->els, old->els, text->len * sizeof(fz_textel)); + + return text; +} + fz_rect fz_boundtext(fz_text *text, fz_matrix ctm) { |