diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-05-23 17:45:21 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-05-24 12:48:35 +0100 |
commit | d0b78f4166a1503ce522944002b3aab035724cd9 (patch) | |
tree | b8c680dc401db56a28be1110759219c7c175dd8d /source/fitz/draw-glyph.c | |
parent | 841952db71d6541a2e98fd4d1d49dede284b2cf8 (diff) | |
download | mupdf-d0b78f4166a1503ce522944002b3aab035724cd9.tar.xz |
fz_pixmap revamp: add stride and make alpha optional
fz_pixmaps now have an explicit stride value. By default no change
from before, but code all copes with extra gaps at the end of the
line.
The alpha data in fz_pixmaps is no longer compulsory.
mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw).
Update halftone code to not expect alpha plane.
Update PNG writing to cope with alpha less input.
Also hide repeated params within the png output context.
ARM code needs updating.
Diffstat (limited to 'source/fitz/draw-glyph.c')
-rw-r--r-- | source/fitz/draw-glyph.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/fitz/draw-glyph.c b/source/fitz/draw-glyph.c index 691e426d..98f9252b 100644 --- a/source/fitz/draw-glyph.c +++ b/source/fitz/draw-glyph.c @@ -185,7 +185,7 @@ fz_render_stroked_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *trm, (void)fz_subpixel_adjust(ctx, trm, &subpix_trm, &qe, &qf); return fz_render_ft_stroked_glyph(ctx, font, gid, &subpix_trm, ctm, stroke); } - return fz_render_glyph(ctx, font, gid, trm, NULL, scissor); + return fz_render_glyph(ctx, font, gid, trm, NULL, scissor, 1); } fz_pixmap * @@ -201,7 +201,7 @@ fz_render_stroked_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, fz_matri (void)fz_subpixel_adjust(ctx, trm, &subpix_trm, &qe, &qf); return fz_render_ft_stroked_glyph_pixmap(ctx, font, gid, &subpix_trm, ctm, stroke); } - return fz_render_glyph_pixmap(ctx, font, gid, trm, NULL, scissor); + return fz_render_glyph_pixmap(ctx, font, gid, trm, scissor); } static unsigned do_hash(unsigned char *s, int len) @@ -241,7 +241,7 @@ move_to_front(fz_glyph_cache *cache, fz_glyph_cache_entry *entry) } fz_glyph * -fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colorspace *model, const fz_irect *scissor) +fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colorspace *model, const fz_irect *scissor, int alpha) { fz_glyph_cache *cache; fz_glyph_key key; @@ -407,7 +407,7 @@ unlock_and_return_val: } fz_pixmap * -fz_render_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colorspace *model, const fz_irect *scissor) +fz_render_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, const fz_irect *scissor) { fz_pixmap *val; unsigned char qe, qf; @@ -432,7 +432,7 @@ fz_render_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, } else if (font->t3procs) { - val = fz_render_t3_glyph_pixmap(ctx, font, gid, &subpix_ctm, model, scissor); + val = fz_render_t3_glyph_pixmap(ctx, font, gid, &subpix_ctm, NULL, scissor); } else { |