diff options
Diffstat (limited to 'draw')
-rw-r--r-- | draw/draw_affine.c | 2 | ||||
-rw-r--r-- | draw/draw_blend.c | 2 | ||||
-rw-r--r-- | draw/draw_device.c | 20 | ||||
-rw-r--r-- | draw/draw_edge.c | 8 | ||||
-rw-r--r-- | draw/draw_glyph.c | 2 | ||||
-rw-r--r-- | draw/draw_mesh.c | 6 | ||||
-rw-r--r-- | draw/draw_paint.c | 2 | ||||
-rw-r--r-- | draw/draw_path.c | 2 | ||||
-rw-r--r-- | draw/draw_scale.c | 2 | ||||
-rw-r--r-- | draw/draw_simple_scale.c | 2 | ||||
-rw-r--r-- | draw/draw_unpack.c | 2 |
11 files changed, 28 insertions, 22 deletions
diff --git a/draw/draw_affine.c b/draw/draw_affine.c index dc15eaf5..67361faf 100644 --- a/draw/draw_affine.c +++ b/draw/draw_affine.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" typedef unsigned char byte; diff --git a/draw/draw_blend.c b/draw/draw_blend.c index e60c09c5..3e81568f 100644 --- a/draw/draw_blend.c +++ b/draw/draw_blend.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" /* PDF 1.4 blend modes. These are slow. */ diff --git a/draw/draw_device.c b/draw/draw_device.c index f40c6627..e2c22db1 100644 --- a/draw/draw_device.c +++ b/draw/draw_device.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" #define QUANT(x,a) (((int)((x) * (a))) / (a)) #define HSUBPIX 5.0 @@ -248,7 +248,7 @@ fz_draw_fill_path(fz_device *devp, fz_path *path, int even_odd, fz_matrix ctm, if (state->blendmode & FZ_BLEND_KNOCKOUT) state = fz_knockout_begin(dev); - fz_convert_color(dev->ctx, colorspace, color, model, colorfv); + fz_convert_color(dev->ctx, model, colorfv, colorspace, color); for (i = 0; i < model->n; i++) colorbv[i] = colorfv[i] * 255; colorbv[i] = alpha * 255; @@ -302,7 +302,7 @@ fz_draw_stroke_path(fz_device *devp, fz_path *path, fz_stroke_state *stroke, fz_ if (state->blendmode & FZ_BLEND_KNOCKOUT) state = fz_knockout_begin(dev); - fz_convert_color(dev->ctx, colorspace, color, model, colorfv); + fz_convert_color(dev->ctx, model, colorfv, colorspace, color); for (i = 0; i < model->n; i++) colorbv[i] = colorfv[i] * 255; colorbv[i] = alpha * 255; @@ -472,7 +472,7 @@ fz_draw_fill_text(fz_device *devp, fz_text *text, fz_matrix ctm, if (state->blendmode & FZ_BLEND_KNOCKOUT) state = fz_knockout_begin(dev); - fz_convert_color(dev->ctx, colorspace, color, model, colorfv); + fz_convert_color(dev->ctx, model, colorfv, colorspace, color); for (i = 0; i < model->n; i++) colorbv[i] = colorfv[i] * 255; colorbv[i] = alpha * 255; @@ -532,7 +532,7 @@ fz_draw_stroke_text(fz_device *devp, fz_text *text, fz_stroke_state *stroke, fz_ if (state->blendmode & FZ_BLEND_KNOCKOUT) state = fz_knockout_begin(dev); - fz_convert_color(dev->ctx, colorspace, color, model, colorfv); + fz_convert_color(dev->ctx, model, colorfv, colorspace, color); for (i = 0; i < model->n; i++) colorbv[i] = colorfv[i] * 255; colorbv[i] = alpha * 255; @@ -775,7 +775,7 @@ fz_draw_fill_shade(fz_device *devp, fz_shade *shade, fz_matrix ctm, float alpha) { unsigned char *s; int x, y, n, i; - fz_convert_color(dev->ctx, shade->colorspace, shade->background, model, colorfv); + fz_convert_color(dev->ctx, model, colorfv, shade->colorspace, shade->background); for (i = 0; i < model->n; i++) colorbv[i] = colorfv[i] * 255; colorbv[i] = 255; @@ -927,7 +927,7 @@ fz_draw_fill_image(fz_device *devp, fz_image *image, fz_matrix ctm, float alpha) if (pixmap->colorspace != model && !after) { converted = fz_new_pixmap_with_rect(ctx, model, fz_bound_pixmap(pixmap)); - fz_convert_pixmap(ctx, pixmap, converted); + fz_convert_pixmap(ctx, converted, pixmap); pixmap = converted; } @@ -957,7 +957,7 @@ fz_draw_fill_image(fz_device *devp, fz_image *image, fz_matrix ctm, float alpha) else { converted = fz_new_pixmap_with_rect(ctx, model, fz_bound_pixmap(pixmap)); - fz_convert_pixmap(ctx, pixmap, converted); + fz_convert_pixmap(ctx, converted, pixmap); pixmap = converted; } } @@ -1027,7 +1027,7 @@ fz_draw_fill_image_mask(fz_device *devp, fz_image *image, fz_matrix ctm, pixmap = scaled; } - fz_convert_color(dev->ctx, colorspace, color, model, colorfv); + fz_convert_color(dev->ctx, model, colorfv, colorspace, color); for (i = 0; i < model->n; i++) colorbv[i] = colorfv[i] * 255; colorbv[i] = alpha * 255; @@ -1228,7 +1228,7 @@ fz_draw_begin_mask(fz_device *devp, fz_rect rect, int luminosity, fz_colorspace float bc; if (!colorspace) colorspace = fz_device_gray; - fz_convert_color(dev->ctx, colorspace, colorfv, fz_device_gray, &bc); + fz_convert_color(dev->ctx, fz_device_gray, &bc, colorspace, colorfv); fz_clear_pixmap_with_value(dev->ctx, dest, bc * 255); if (shape) fz_clear_pixmap_with_value(dev->ctx, shape, 255); diff --git a/draw/draw_edge.c b/draw/draw_edge.c index adb460ac..fa192bb8 100644 --- a/draw/draw_edge.c +++ b/draw/draw_edge.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" #define BBOX_MIN -(1<<20) #define BBOX_MAX (1<<20) @@ -41,6 +41,12 @@ void fz_new_aa_context(fz_context *ctx) #endif } +void fz_copy_aa_context(fz_context *dst, fz_context *src) +{ + if (dst && src) + memcpy(dst, src, sizeof(*src)); +} + void fz_free_aa_context(fz_context *ctx) { #ifndef AA_BITS diff --git a/draw/draw_glyph.c b/draw/draw_glyph.c index b8f69ce3..0761b8a9 100644 --- a/draw/draw_glyph.c +++ b/draw/draw_glyph.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" #define MAX_FONT_SIZE 1000 #define MAX_GLYPH_SIZE 256 diff --git a/draw/draw_mesh.c b/draw/draw_mesh.c index 79bac732..1d6f1759 100644 --- a/draw/draw_mesh.c +++ b/draw/draw_mesh.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" /* * polygon clipping @@ -509,7 +509,7 @@ fz_paint_mesh(fz_context *ctx, fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, tri[k][2] = *mesh++ * 255; else { - fz_convert_color(ctx, shade->colorspace, mesh, dest->colorspace, tri[k] + 2); + fz_convert_color(ctx, dest->colorspace, tri[k] + 2, shade->colorspace, mesh); for (i = 0; i < dest->colorspace->n; i++) tri[k][i + 2] *= 255; mesh += shade->colorspace->n; @@ -539,7 +539,7 @@ fz_paint_shade(fz_context *ctx, fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, { for (i = 0; i < 256; i++) { - fz_convert_color(ctx, shade->colorspace, shade->function[i], dest->colorspace, color); + fz_convert_color(ctx, dest->colorspace, color, shade->colorspace, shade->function[i]); for (k = 0; k < dest->colorspace->n; k++) clut[i][k] = color[k] * 255; clut[i][k] = shade->function[i][shade->colorspace->n] * 255; diff --git a/draw/draw_paint.c b/draw/draw_paint.c index 3b02b870..6a73783b 100644 --- a/draw/draw_paint.c +++ b/draw/draw_paint.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" /* diff --git a/draw/draw_path.c b/draw/draw_path.c index eca7dc08..2ef8cf3a 100644 --- a/draw/draw_path.c +++ b/draw/draw_path.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" #define MAX_DEPTH 8 diff --git a/draw/draw_scale.c b/draw/draw_scale.c index e758c989..aceec939 100644 --- a/draw/draw_scale.c +++ b/draw/draw_scale.c @@ -6,7 +6,7 @@ given by taking the source pixmap src, scaling it to width w, and height h, and then positioning it at (frac(x),frac(y)). */ -#include "fitz.h" +#include "fitz-internal.h" /* Do we special case handling of single pixel high/wide images? The * 'purest' handling is given by not special casing them, but certain diff --git a/draw/draw_simple_scale.c b/draw/draw_simple_scale.c index 6d0ad481..8143b6fd 100644 --- a/draw/draw_simple_scale.c +++ b/draw/draw_simple_scale.c @@ -10,7 +10,7 @@ that return values strictly in the 0..1 range, and uses bytes for intermediate results rather than ints. */ -#include "fitz.h" +#include "fitz-internal.h" /* Do we special case handling of single pixel high/wide images? The * 'purest' handling is given by not special casing them, but certain diff --git a/draw/draw_unpack.c b/draw/draw_unpack.c index 6da5e8a3..f988dcf9 100644 --- a/draw/draw_unpack.c +++ b/draw/draw_unpack.c @@ -1,4 +1,4 @@ -#include "fitz.h" +#include "fitz-internal.h" /* Unpack image samples and optionally pad pixels with opaque alpha */ |