diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-08-04 13:43:58 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-08-04 13:43:58 +0000 |
commit | 2c036aab4670a93490d42de3492983feb389231d (patch) | |
tree | 1248816b579df9101cae086c88a568aeac5224f5 /fitz/res_font.c | |
parent | 724d113ed8840470ded2b32a52c9b53a4e0a5c6b (diff) | |
download | mupdf-2c036aab4670a93490d42de3492983feb389231d.tar.xz |
Rearrange low level painting functions and add new functions for constant alpha painting.
Diffstat (limited to 'fitz/res_font.c')
-rw-r--r-- | fitz/res_font.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fitz/res_font.c b/fitz/res_font.c index 68b761b2..fd3bbe3f 100644 --- a/fitz/res_font.c +++ b/fitz/res_font.c @@ -458,6 +458,7 @@ fz_rendert3glyph(fz_font *font, int gid, fz_matrix trm) fz_device *dev; fz_glyphcache *cache; fz_pixmap *glyph; + fz_pixmap *result; if (gid < 0 || gid > 255) return NULL; @@ -473,7 +474,7 @@ fz_rendert3glyph(fz_font *font, int gid, fz_matrix trm) fz_catch(error, "cannot draw type3 glyph"); fz_freedevice(dev); - glyph = fz_newpixmap(nil, bbox.x0-1, bbox.y0-1, bbox.x1 - bbox.x0 + 1, bbox.y1 - bbox.y0 + 1); + glyph = fz_newpixmap(fz_devicegray, bbox.x0-1, bbox.y0-1, bbox.x1 - bbox.x0 + 1, bbox.y1 - bbox.y0 + 1); fz_clearpixmap(glyph, 0); cache = fz_newglyphcache(); @@ -484,7 +485,10 @@ fz_rendert3glyph(fz_font *font, int gid, fz_matrix trm) fz_freedevice(dev); fz_freeglyphcache(cache); - return glyph; + result = fz_alphafromgray(glyph, 0); + fz_droppixmap(glyph); + + return result; } void |