summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/bbox-device.c12
-rw-r--r--source/fitz/colorspace.c36
-rw-r--r--source/fitz/device.c12
-rw-r--r--source/fitz/draw-device.c12
-rw-r--r--source/fitz/list-device.c14
-rw-r--r--source/fitz/stext-device.c8
-rw-r--r--source/fitz/svg-device.c20
-rw-r--r--source/fitz/test-device.c12
-rw-r--r--source/fitz/trace-device.c14
9 files changed, 68 insertions, 72 deletions
diff --git a/source/fitz/bbox-device.c b/source/fitz/bbox-device.c
index cc3afcd4..83be00c8 100644
--- a/source/fitz/bbox-device.c
+++ b/source/fitz/bbox-device.c
@@ -35,7 +35,7 @@ fz_bbox_add_rect(fz_context *ctx, fz_device *dev, const fz_rect *rect, int clip)
static void
fz_bbox_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect r;
fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, NULL, ctm, &r), 0);
@@ -43,7 +43,7 @@ fz_bbox_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even
static void
fz_bbox_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke,
- const fz_matrix *ctm, const fz_colorspace *colorspace, const float *color, float alpha)
+ const fz_matrix *ctm, fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect r;
fz_bbox_add_rect(ctx, dev, fz_bound_path(ctx, path, stroke, ctm, &r), 0);
@@ -51,7 +51,7 @@ fz_bbox_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const
static void
fz_bbox_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect r;
fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, NULL, ctm, &r), 0);
@@ -59,7 +59,7 @@ fz_bbox_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz
static void
fz_bbox_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke,
- const fz_matrix *ctm, const fz_colorspace *colorspace, const float *color, float alpha)
+ const fz_matrix *ctm, fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect r;
fz_bbox_add_rect(ctx, dev, fz_bound_text(ctx, text, stroke, ctm, &r), 0);
@@ -81,7 +81,7 @@ fz_bbox_fill_image(fz_context *ctx, fz_device *dev, const fz_image *image, const
static void
fz_bbox_fill_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect r = fz_unit_rect;
fz_bbox_add_rect(ctx, dev, fz_transform_rect(&r, ctm), 0);
@@ -133,7 +133,7 @@ fz_bbox_pop_clip(fz_context *ctx, fz_device *dev)
}
static void
-fz_bbox_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *rect, int luminosity, const fz_colorspace *colorspace, const float *color)
+fz_bbox_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *rect, int luminosity, fz_colorspace *colorspace, const float *color)
{
fz_bbox_device *bdev = (fz_bbox_device*)dev;
fz_bbox_add_rect(ctx, dev, rect, 1);
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c
index e579784c..5549496e 100644
--- a/source/fitz/colorspace.c
+++ b/source/fitz/colorspace.c
@@ -28,31 +28,27 @@ fz_new_colorspace(fz_context *ctx, char *name, int n)
}
fz_colorspace *
-fz_keep_colorspace(fz_context *ctx, const fz_colorspace *csc)
+fz_keep_colorspace(fz_context *ctx, fz_colorspace *cs)
{
- fz_colorspace *cs = (fz_colorspace *)csc; /* Explicit cast away of const */
-
return (fz_colorspace *)fz_keep_storable(ctx, &cs->storable);
}
void
-fz_drop_colorspace(fz_context *ctx, const fz_colorspace *csc)
+fz_drop_colorspace(fz_context *ctx, fz_colorspace *cs)
{
- fz_colorspace *cs = (fz_colorspace *)csc; /* Explicit cast away of const */
-
fz_drop_storable(ctx, &cs->storable);
}
/* Device colorspace definitions */
-static void gray_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *gray, float *rgb)
+static void gray_to_rgb(fz_context *ctx, fz_colorspace *cs, const float *gray, float *rgb)
{
rgb[0] = gray[0];
rgb[1] = gray[0];
rgb[2] = gray[0];
}
-static void rgb_to_gray(fz_context *ctx, const fz_colorspace *cs, const float *rgb, float *gray)
+static void rgb_to_gray(fz_context *ctx, fz_colorspace *cs, const float *rgb, float *gray)
{
float r = rgb[0];
float g = rgb[1];
@@ -60,28 +56,28 @@ static void rgb_to_gray(fz_context *ctx, const fz_colorspace *cs, const float *r
gray[0] = r * 0.3f + g * 0.59f + b * 0.11f;
}
-static void rgb_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *rgb, float *xyz)
+static void rgb_to_rgb(fz_context *ctx, fz_colorspace *cs, const float *rgb, float *xyz)
{
xyz[0] = rgb[0];
xyz[1] = rgb[1];
xyz[2] = rgb[2];
}
-static void bgr_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *bgr, float *rgb)
+static void bgr_to_rgb(fz_context *ctx, fz_colorspace *cs, const float *bgr, float *rgb)
{
rgb[0] = bgr[2];
rgb[1] = bgr[1];
rgb[2] = bgr[0];
}
-static void rgb_to_bgr(fz_context *ctx, const fz_colorspace *cs, const float *rgb, float *bgr)
+static void rgb_to_bgr(fz_context *ctx, fz_colorspace *cs, const float *rgb, float *bgr)
{
bgr[0] = rgb[2];
bgr[1] = rgb[1];
bgr[2] = rgb[0];
}
-static void cmyk_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *cmyk, float *rgb)
+static void cmyk_to_rgb(fz_context *ctx, fz_colorspace *cs, const float *cmyk, float *rgb)
{
#ifdef SLOWCMYK /* from poppler */
float c = cmyk[0], m = cmyk[1], y = cmyk[2], k = cmyk[3];
@@ -160,7 +156,7 @@ static void cmyk_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *c
#endif
}
-static void rgb_to_cmyk(fz_context *ctx, const fz_colorspace *cs, const float *rgb, float *cmyk)
+static void rgb_to_cmyk(fz_context *ctx, fz_colorspace *cs, const float *rgb, float *cmyk)
{
float c, m, y, k;
c = 1 - rgb[0];
@@ -1009,8 +1005,8 @@ std_conv_color(fz_context *ctx, fz_color_converter *cc, float *dstv, const float
{
float rgb[3];
int i;
- const fz_colorspace *srcs = cc->ss;
- const fz_colorspace *dsts = cc->ds;
+ fz_colorspace *srcs = cc->ss;
+ fz_colorspace *dsts = cc->ds;
if (srcs != dsts)
{
@@ -1127,7 +1123,7 @@ cmyk2bgr(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv)
#endif
}
-void fz_lookup_color_converter(fz_context *ctx, fz_color_converter *cc, const fz_colorspace *ds, const fz_colorspace *ss)
+void fz_lookup_color_converter(fz_context *ctx, fz_color_converter *cc, fz_colorspace *ds, fz_colorspace *ss)
{
cc->ds = ds;
cc->ss = ss;
@@ -1182,7 +1178,7 @@ void fz_lookup_color_converter(fz_context *ctx, fz_color_converter *cc, const fz
}
void
-fz_convert_color(fz_context *ctx, const fz_colorspace *ds, float *dv, const fz_colorspace *ss, const float *sv)
+fz_convert_color(fz_context *ctx, fz_colorspace *ds, float *dv, fz_colorspace *ss, const float *sv)
{
fz_color_converter cc;
fz_lookup_color_converter(ctx, &cc, ds, ss);
@@ -1199,7 +1195,7 @@ struct indexed
};
static void
-indexed_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *color, float *rgb)
+indexed_to_rgb(fz_context *ctx, fz_colorspace *cs, const float *color, float *rgb)
{
struct indexed *idx = cs->data;
float alt[FZ_MAX_COLORS];
@@ -1212,7 +1208,7 @@ indexed_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *color, flo
}
static void
-free_indexed(fz_context *ctx, const fz_colorspace *cs)
+free_indexed(fz_context *ctx, fz_colorspace *cs)
{
struct indexed *idx = cs->data;
if (idx->base)
@@ -1322,7 +1318,7 @@ static void fz_cached_color_convert(fz_context *ctx, fz_color_converter *cc_, fl
}
}
-void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, const fz_colorspace *ds, const fz_colorspace *ss)
+void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_colorspace *ds, fz_colorspace *ss)
{
int n = ss->n;
fz_cached_color_converter *cached = fz_malloc_struct(ctx, fz_cached_color_converter);
diff --git a/source/fitz/device.c b/source/fitz/device.c
index f95ae32a..8913cdb2 100644
--- a/source/fitz/device.c
+++ b/source/fitz/device.c
@@ -75,7 +75,7 @@ pop_clip_stack(fz_context *ctx, fz_device *dev)
void
fz_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
if (dev->error_depth)
return;
@@ -85,7 +85,7 @@ fz_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd,
void
fz_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
if (dev->error_depth)
return;
@@ -161,7 +161,7 @@ fz_clip_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const
void
fz_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
if (dev->error_depth)
return;
@@ -171,7 +171,7 @@ fz_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matr
void
fz_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
if (dev->error_depth)
return;
@@ -280,7 +280,7 @@ fz_fill_image(fz_context *ctx, fz_device *dev, const fz_image *image, const fz_m
void
fz_fill_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
if (dev->error_depth)
return;
@@ -313,7 +313,7 @@ fz_clip_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image, const
}
void
-fz_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *area, int luminosity, const fz_colorspace *colorspace, const float *bc)
+fz_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *area, int luminosity, fz_colorspace *colorspace, const float *bc)
{
if (dev->error_depth)
{
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index e2d3f736..0617ea7b 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -266,7 +266,7 @@ static void fz_knockout_end(fz_context *ctx, fz_draw_device *dev)
static void
fz_draw_fill_path(fz_context *ctx, fz_device *devp, const fz_path *path, int even_odd, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_draw_device *dev = (fz_draw_device*)devp;
fz_gel *gel = dev->gel;
@@ -320,7 +320,7 @@ fz_draw_fill_path(fz_context *ctx, fz_device *devp, const fz_path *path, int eve
static void
fz_draw_stroke_path(fz_context *ctx, fz_device *devp, const fz_path *path, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_draw_device *dev = (fz_draw_device*)devp;
fz_gel *gel = dev->gel;
@@ -559,7 +559,7 @@ draw_glyph(unsigned char *colorbv, fz_pixmap *dst, fz_glyph *glyph,
static void
fz_draw_fill_text(fz_context *ctx, fz_device *devp, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_draw_device *dev = (fz_draw_device*)devp;
fz_draw_state *state = &dev->stack[dev->top];
@@ -640,7 +640,7 @@ fz_draw_fill_text(fz_context *ctx, fz_device *devp, const fz_text *text, const f
static void
fz_draw_stroke_text(fz_context *ctx, fz_device *devp, const fz_text *text, const fz_stroke_state *stroke,
- const fz_matrix *ctm, const fz_colorspace *colorspace,
+ const fz_matrix *ctm, fz_colorspace *colorspace,
const float *color, float alpha)
{
fz_draw_device *dev = (fz_draw_device*)devp;
@@ -1190,7 +1190,7 @@ fz_draw_fill_image(fz_context *ctx, fz_device *devp, const fz_image *image, cons
static void
fz_draw_fill_image_mask(fz_context *ctx, fz_device *devp, const fz_image *image, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_draw_device *dev = (fz_draw_device*)devp;
unsigned char colorbv[FZ_MAX_COLORS + 1];
@@ -1419,7 +1419,7 @@ fz_draw_pop_clip(fz_context *ctx, fz_device *devp)
}
static void
-fz_draw_begin_mask(fz_context *ctx, fz_device *devp, const fz_rect *rect, int luminosity, const fz_colorspace *colorspace, const float *colorfv)
+fz_draw_begin_mask(fz_context *ctx, fz_device *devp, const fz_rect *rect, int luminosity, fz_colorspace *colorspace, const float *colorfv)
{
fz_draw_device *dev = (fz_draw_device*)devp;
fz_pixmap *dest;
diff --git a/source/fitz/list-device.c b/source/fitz/list-device.c
index d5a869c7..5ad6e305 100644
--- a/source/fitz/list-device.c
+++ b/source/fitz/list-device.c
@@ -156,7 +156,7 @@ fz_append_display_node(
const fz_rect *rect,
const fz_path *path,
const float *color,
- const fz_colorspace *colorspace,
+ fz_colorspace *colorspace,
const float *alpha,
const fz_matrix *ctm,
const fz_stroke_state *stroke,
@@ -679,7 +679,7 @@ fz_list_end_page(fz_context *ctx, fz_device *dev)
static void
fz_list_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect rect;
@@ -702,7 +702,7 @@ fz_list_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even
static void
fz_list_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke,
- const fz_matrix *ctm, const fz_colorspace *colorspace, const float *color, float alpha)
+ const fz_matrix *ctm, fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect rect;
@@ -773,7 +773,7 @@ fz_list_clip_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, c
static void
fz_list_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect rect;
fz_text *cloned_text = fz_keep_text(ctx, text);
@@ -805,7 +805,7 @@ fz_list_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz
static void
fz_list_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_rect rect;
fz_text *cloned_text = fz_keep_text(ctx, text);
@@ -1011,7 +1011,7 @@ fz_list_fill_image(fz_context *ctx, fz_device *dev, const fz_image *image, const
static void
fz_list_fill_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_image *image2 = fz_keep_image(ctx, image);
fz_rect rect = fz_unit_rect;
@@ -1075,7 +1075,7 @@ fz_list_clip_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image,
}
static void
-fz_list_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *rect, int luminosity, const fz_colorspace *colorspace, const float *color)
+fz_list_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *rect, int luminosity, fz_colorspace *colorspace, const float *color)
{
fz_append_display_node(
ctx,
diff --git a/source/fitz/stext-device.c b/source/fitz/stext-device.c
index 3cf207c2..d4a0ab46 100644
--- a/source/fitz/stext-device.c
+++ b/source/fitz/stext-device.c
@@ -438,7 +438,7 @@ fz_lookup_stext_style_imp(fz_context *ctx, fz_stext_sheet *sheet,
static fz_stext_style *
fz_lookup_stext_style(fz_context *ctx, fz_stext_sheet *sheet, fz_text_span *span, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha, const fz_stroke_state *stroke)
+ fz_colorspace *colorspace, const float *color, float alpha, const fz_stroke_state *stroke)
{
float size = 1.0f;
fz_font *font = span ? span->font : NULL;
@@ -827,7 +827,7 @@ fz_stext_extract(fz_context *ctx, fz_stext_device *dev, fz_text_span *span, cons
static void
fz_stext_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_stext_device *tdev = (fz_stext_device*)dev;
fz_stext_style *style;
@@ -841,7 +841,7 @@ fz_stext_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const f
static void
fz_stext_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_stext_device *tdev = (fz_stext_device*)dev;
fz_stext_style *style;
@@ -894,7 +894,7 @@ fz_stext_ignore_text(fz_context *ctx, fz_device *dev, const fz_text *text, const
static void
fz_stext_fill_image_mask(fz_context *ctx, fz_device *dev, const fz_image *img, const fz_matrix *ctm,
- const fz_colorspace *cspace, const float *color, float alpha)
+ fz_colorspace *cspace, const float *color, float alpha)
{
fz_stext_device *tdev = (fz_stext_device*)dev;
fz_stext_page *page = tdev->page;
diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c
index 08912687..67525ed4 100644
--- a/source/fitz/svg-device.c
+++ b/source/fitz/svg-device.c
@@ -179,7 +179,7 @@ svg_dev_stroke_state(fz_context *ctx, svg_device *sdev, const fz_stroke_state *s
}
static void
-svg_dev_fill_color(fz_context *ctx, svg_device *sdev, const fz_colorspace *colorspace, const float *color, float alpha)
+svg_dev_fill_color(fz_context *ctx, svg_device *sdev, fz_colorspace *colorspace, const float *color, float alpha)
{
fz_output *out = sdev->out;
float rgb[FZ_MAX_COLORS];
@@ -202,7 +202,7 @@ svg_dev_fill_color(fz_context *ctx, svg_device *sdev, const fz_colorspace *color
}
static void
-svg_dev_stroke_color(fz_context *ctx, svg_device *sdev, const fz_colorspace *colorspace, const float *color, float alpha)
+svg_dev_stroke_color(fz_context *ctx, svg_device *sdev, fz_colorspace *colorspace, const float *color, float alpha)
{
fz_output *out = sdev->out;
float rgb[FZ_MAX_COLORS];
@@ -404,7 +404,7 @@ svg_dev_text_span_as_paths_defs(fz_context *ctx, fz_device *dev, fz_text_span *s
static void
svg_dev_text_span_as_paths_fill(fz_context *ctx, fz_device *dev, const fz_text_span *span, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha, font *fnt)
+ fz_colorspace *colorspace, const float *color, float alpha, font *fnt)
{
svg_device *sdev = (svg_device*)dev;
fz_output *out = sdev->out;
@@ -445,7 +445,7 @@ svg_dev_text_span_as_paths_fill(fz_context *ctx, fz_device *dev, const fz_text_s
static void
svg_dev_text_span_as_paths_stroke(fz_context *ctx, fz_device *dev, const fz_text_span *span,
const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha, font *fnt)
+ fz_colorspace *colorspace, const float *color, float alpha, font *fnt)
{
svg_device *sdev = (svg_device*)dev;
fz_output *out = sdev->out;
@@ -487,7 +487,7 @@ svg_dev_text_span_as_paths_stroke(fz_context *ctx, fz_device *dev, const fz_text
static void
svg_dev_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
svg_device *sdev = (svg_device*)dev;
fz_output *out = sdev->out;
@@ -503,7 +503,7 @@ svg_dev_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even
static void
svg_dev_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
svg_device *sdev = (svg_device*)dev;
fz_output *out = sdev->out;
@@ -563,7 +563,7 @@ svg_dev_clip_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, c
static void
svg_dev_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
svg_device *sdev = (svg_device*)dev;
fz_output *out = sdev->out;
@@ -583,7 +583,7 @@ svg_dev_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz
static void
svg_dev_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
svg_device *sdev = (svg_device*)dev;
fz_output *out = sdev->out;
@@ -802,7 +802,7 @@ svg_dev_fill_shade(fz_context *ctx, fz_device *dev, const fz_shade *shade, const
static void
svg_dev_fill_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
svg_device *sdev = (svg_device*)dev;
@@ -897,7 +897,7 @@ svg_dev_pop_clip(fz_context *ctx, fz_device *dev)
}
static void
-svg_dev_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *bbox, int luminosity, const fz_colorspace *colorspace, const float *color)
+svg_dev_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *bbox, int luminosity, fz_colorspace *colorspace, const float *color)
{
svg_device *sdev = (svg_device*)dev;
fz_output *out;
diff --git a/source/fitz/test-device.c b/source/fitz/test-device.c
index 339b1e94..065fa59e 100644
--- a/source/fitz/test-device.c
+++ b/source/fitz/test-device.c
@@ -26,7 +26,7 @@ is_rgb_color_u8(int threshold_u8, int r, int g, int b)
}
static void
-fz_test_color(fz_context *ctx, fz_device *dev, const fz_colorspace *colorspace, const float *color)
+fz_test_color(fz_context *ctx, fz_device *dev, fz_colorspace *colorspace, const float *color)
{
fz_test_device *t = (fz_test_device*)dev;
@@ -57,7 +57,7 @@ fz_test_color(fz_context *ctx, fz_device *dev, const fz_colorspace *colorspace,
static void
fz_test_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
if (alpha != 0.0f)
fz_test_color(ctx, dev, colorspace, color);
@@ -65,7 +65,7 @@ fz_test_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even
static void
fz_test_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke,
- const fz_matrix *ctm, const fz_colorspace *colorspace, const float *color, float alpha)
+ const fz_matrix *ctm, fz_colorspace *colorspace, const float *color, float alpha)
{
if (alpha != 0.0f)
fz_test_color(ctx, dev, colorspace, color);
@@ -73,7 +73,7 @@ fz_test_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const
static void
fz_test_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
if (alpha != 0.0f)
fz_test_color(ctx, dev, colorspace, color);
@@ -81,7 +81,7 @@ fz_test_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz
static void
fz_test_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke,
- const fz_matrix *ctm, const fz_colorspace *colorspace, const float *color, float alpha)
+ const fz_matrix *ctm, fz_colorspace *colorspace, const float *color, float alpha)
{
if (alpha != 0.0f)
fz_test_color(ctx, dev, colorspace, color);
@@ -242,7 +242,7 @@ fz_test_fill_image(fz_context *ctx, fz_device *dev, const fz_image *image, const
static void
fz_test_fill_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
/* We assume that at least some of the image pixels are non-zero */
fz_test_color(ctx, dev, colorspace, color);
diff --git a/source/fitz/trace-device.c b/source/fitz/trace-device.c
index 6d12a396..8b2190dc 100644
--- a/source/fitz/trace-device.c
+++ b/source/fitz/trace-device.c
@@ -14,7 +14,7 @@ fz_trace_matrix(fz_context *ctx, fz_output *out, const fz_matrix *ctm)
}
static void
-fz_trace_color(fz_context *ctx, fz_output *out, const fz_colorspace *colorspace, const float *color, float alpha)
+fz_trace_color(fz_context *ctx, fz_output *out, fz_colorspace *colorspace, const float *color, float alpha)
{
int i;
fz_printf(ctx, out, " colorspace=\"%s\" color=\"", colorspace->name);
@@ -117,7 +117,7 @@ fz_trace_end_page(fz_context *ctx, fz_device *dev)
static void
fz_trace_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int even_odd, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_output *out = ((fz_trace_device*)dev)->out;
fz_printf(ctx, out, "<fill_path");
@@ -134,7 +134,7 @@ fz_trace_fill_path(fz_context *ctx, fz_device *dev, const fz_path *path, int eve
static void
fz_trace_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_output *out = ((fz_trace_device*)dev)->out;
int i;
@@ -193,7 +193,7 @@ fz_trace_clip_stroke_path(fz_context *ctx, fz_device *dev, const fz_path *path,
static void
fz_trace_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_output *out = ((fz_trace_device*)dev)->out;
fz_printf(ctx, out, "<fill_text");
@@ -206,7 +206,7 @@ fz_trace_fill_text(fz_context *ctx, fz_device *dev, const fz_text *text, const f
static void
fz_trace_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, const fz_stroke_state *stroke, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_output *out = ((fz_trace_device*)dev)->out;
fz_printf(ctx, out, "<stroke_text");
@@ -271,7 +271,7 @@ fz_trace_fill_shade(fz_context *ctx, fz_device *dev, const fz_shade *shade, cons
static void
fz_trace_fill_image_mask(fz_context *ctx, fz_device *dev, const fz_image *image, const fz_matrix *ctm,
- const fz_colorspace *colorspace, const float *color, float alpha)
+ fz_colorspace *colorspace, const float *color, float alpha)
{
fz_output *out = ((fz_trace_device*)dev)->out;
fz_printf(ctx, out, "<fill_image_mask");
@@ -299,7 +299,7 @@ fz_trace_pop_clip(fz_context *ctx, fz_device *dev)
}
static void
-fz_trace_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *bbox, int luminosity, const fz_colorspace *colorspace, const float *color)
+fz_trace_begin_mask(fz_context *ctx, fz_device *dev, const fz_rect *bbox, int luminosity, fz_colorspace *colorspace, const float *color)
{
fz_output *out = ((fz_trace_device*)dev)->out;
fz_printf(ctx, out, "<mask bbox=\"%g %g %g %g\" s=\"%s\"",