summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'fitz')
-rw-r--r--fitz/dev_draw.c2
-rw-r--r--fitz/fitz.h8
-rw-r--r--fitz/res_colorspace.c70
3 files changed, 40 insertions, 40 deletions
diff --git a/fitz/dev_draw.c b/fitz/dev_draw.c
index 0e7e8138..3c94c5c3 100644
--- a/fitz/dev_draw.c
+++ b/fitz/dev_draw.c
@@ -833,7 +833,7 @@ fz_drawbeginmask(void *user, fz_rect rect, int luminosity, fz_colorspace *colors
bbox = fz_roundrect(rect);
bbox = fz_intersectbbox(bbox, dev->scissor);
- dest = fz_newpixmapwithrect(pdf_devicegray, bbox);
+ dest = fz_newpixmapwithrect(fz_devicegray, bbox);
if (luminosity)
fz_clearpixmap(dest, 255);
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 215b9437..3a6087e6 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -714,10 +714,10 @@ fz_error fz_writepng(fz_pixmap *pixmap, char *filename, int savealpha);
* Colorspace resources.
*/
-extern fz_colorspace *pdf_devicegray;
-extern fz_colorspace *pdf_devicergb;
-extern fz_colorspace *pdf_devicebgr;
-extern fz_colorspace *pdf_devicecmyk;
+extern fz_colorspace *fz_devicegray;
+extern fz_colorspace *fz_devicergb;
+extern fz_colorspace *fz_devicebgr;
+extern fz_colorspace *fz_devicecmyk;
struct fz_colorspace_s
{
diff --git a/fitz/res_colorspace.c b/fitz/res_colorspace.c
index 3e8660ab..3d94fdce 100644
--- a/fitz/res_colorspace.c
+++ b/fitz/res_colorspace.c
@@ -108,10 +108,10 @@ static fz_colorspace kdevicergb = { -1, "DeviceRGB", 3, rgbtoxyz, xyztorgb };
static fz_colorspace kdevicebgr = { -1, "DeviceRGB", 3, bgrtoxyz, xyztobgr };
static fz_colorspace kdevicecmyk = { -1, "DeviceCMYK", 4, cmyktoxyz, xyztocmyk };
-fz_colorspace *pdf_devicegray = &kdevicegray;
-fz_colorspace *pdf_devicergb = &kdevicergb;
-fz_colorspace *pdf_devicebgr = &kdevicebgr;
-fz_colorspace *pdf_devicecmyk = &kdevicecmyk;
+fz_colorspace *fz_devicegray = &kdevicegray;
+fz_colorspace *fz_devicergb = &kdevicergb;
+fz_colorspace *fz_devicebgr = &kdevicebgr;
+fz_colorspace *fz_devicecmyk = &kdevicecmyk;
/*
* Pixmap color conversions
@@ -327,35 +327,35 @@ fz_convertpixmap(fz_pixmap *sp, fz_pixmap *dp)
assert(ss && ds);
- if (ss == pdf_devicegray)
+ if (ss == fz_devicegray)
{
- if (ds == pdf_devicergb) fastgraytorgb(sp, dp);
- else if (ds == pdf_devicebgr) fastgraytorgb(sp, dp); /* bgr == rgb here */
- else if (ds == pdf_devicecmyk) fastgraytocmyk(sp, dp);
+ if (ds == fz_devicergb) fastgraytorgb(sp, dp);
+ else if (ds == fz_devicebgr) fastgraytorgb(sp, dp); /* bgr == rgb here */
+ else if (ds == fz_devicecmyk) fastgraytocmyk(sp, dp);
else fz_stdconvpixmap(sp, dp);
}
- else if (ss == pdf_devicergb)
+ else if (ss == fz_devicergb)
{
- if (ds == pdf_devicegray) fastrgbtogray(sp, dp);
- else if (ds == pdf_devicebgr) fastrgbtobgr(sp, dp);
- else if (ds == pdf_devicecmyk) fastrgbtocmyk(sp, dp);
+ if (ds == fz_devicegray) fastrgbtogray(sp, dp);
+ else if (ds == fz_devicebgr) fastrgbtobgr(sp, dp);
+ else if (ds == fz_devicecmyk) fastrgbtocmyk(sp, dp);
else fz_stdconvpixmap(sp, dp);
}
- else if (ss == pdf_devicebgr)
+ else if (ss == fz_devicebgr)
{
- if (ds == pdf_devicegray) fastbgrtogray(sp, dp);
- else if (ds == pdf_devicergb) fastrgbtobgr(sp, dp); /* bgr = rgb here */
- else if (ds == pdf_devicecmyk) fastbgrtocmyk(sp, dp);
+ if (ds == fz_devicegray) fastbgrtogray(sp, dp);
+ else if (ds == fz_devicergb) fastrgbtobgr(sp, dp); /* bgr = rgb here */
+ else if (ds == fz_devicecmyk) fastbgrtocmyk(sp, dp);
else fz_stdconvpixmap(sp, dp);
}
- else if (ss == pdf_devicecmyk)
+ else if (ss == fz_devicecmyk)
{
- if (ds == pdf_devicegray) fastcmyktogray(sp, dp);
- else if (ds == pdf_devicebgr) fastcmyktobgr(sp, dp);
- else if (ds == pdf_devicergb) fastcmyktorgb(sp, dp);
+ if (ds == fz_devicegray) fastcmyktogray(sp, dp);
+ else if (ds == fz_devicebgr) fastcmyktobgr(sp, dp);
+ else if (ds == fz_devicergb) fastcmyktorgb(sp, dp);
else fz_stdconvpixmap(sp, dp);
}
@@ -390,15 +390,15 @@ fz_stdconvcolor(fz_colorspace *srcs, float *srcv, fz_colorspace *dsts, float *ds
void
fz_convertcolor(fz_colorspace *ss, float *sv, fz_colorspace *ds, float *dv)
{
- if (ss == pdf_devicegray)
+ if (ss == fz_devicegray)
{
- if ((ds == pdf_devicergb) || (ds == pdf_devicebgr))
+ if ((ds == fz_devicergb) || (ds == fz_devicebgr))
{
dv[0] = sv[0];
dv[1] = sv[0];
dv[2] = sv[0];
}
- else if (ds == pdf_devicecmyk)
+ else if (ds == fz_devicecmyk)
{
dv[0] = 0;
dv[1] = 0;
@@ -409,19 +409,19 @@ fz_convertcolor(fz_colorspace *ss, float *sv, fz_colorspace *ds, float *dv)
fz_stdconvcolor(ss, sv, ds, dv);
}
- else if (ss == pdf_devicergb)
+ else if (ss == fz_devicergb)
{
- if (ds == pdf_devicegray)
+ if (ds == fz_devicegray)
{
dv[0] = sv[0] * 0.3f + sv[1] * 0.59f + sv[2] * 0.11f;
}
- else if (ds == pdf_devicebgr)
+ else if (ds == fz_devicebgr)
{
dv[0] = sv[2];
dv[1] = sv[1];
dv[2] = sv[0];
}
- else if (ds == pdf_devicecmyk)
+ else if (ds == fz_devicecmyk)
{
float c = 1 - sv[0];
float m = 1 - sv[1];
@@ -436,19 +436,19 @@ fz_convertcolor(fz_colorspace *ss, float *sv, fz_colorspace *ds, float *dv)
fz_stdconvcolor(ss, sv, ds, dv);
}
- else if (ss == pdf_devicebgr)
+ else if (ss == fz_devicebgr)
{
- if (ds == pdf_devicegray)
+ if (ds == fz_devicegray)
{
dv[0] = sv[0] * 0.11f + sv[1] * 0.59f + sv[2] * 0.3f;
}
- else if (ds == pdf_devicebgr)
+ else if (ds == fz_devicebgr)
{
dv[0] = sv[2];
dv[1] = sv[1];
dv[2] = sv[0];
}
- else if (ds == pdf_devicecmyk)
+ else if (ds == fz_devicecmyk)
{
float c = 1 - sv[2];
float m = 1 - sv[1];
@@ -463,22 +463,22 @@ fz_convertcolor(fz_colorspace *ss, float *sv, fz_colorspace *ds, float *dv)
fz_stdconvcolor(ss, sv, ds, dv);
}
- else if (ss == pdf_devicecmyk)
+ else if (ss == fz_devicecmyk)
{
- if (ds == pdf_devicegray)
+ if (ds == fz_devicegray)
{
float c = sv[1] * 0.3f;
float m = sv[2] * 0.59f;
float y = sv[2] * 0.11f;
dv[0] = 1 - MIN(c + m + y + sv[3], 1);
}
- else if (ds == pdf_devicergb)
+ else if (ds == fz_devicergb)
{
dv[0] = 1 - MIN(sv[0] + sv[3], 1);
dv[1] = 1 - MIN(sv[1] + sv[3], 1);
dv[2] = 1 - MIN(sv[2] + sv[3], 1);
}
- else if (ds == pdf_devicebgr)
+ else if (ds == fz_devicebgr)
{
dv[0] = 1 - MIN(sv[2] + sv[3], 1);
dv[1] = 1 - MIN(sv[1] + sv[3], 1);