diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2015-03-17 21:11:38 +0000 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2015-03-17 21:11:38 +0000 |
commit | fa391bc2db07e96f7f0faf7686b7df172fab49ae (patch) | |
tree | d6262e119a745e1aec972a91cf060fcc06a5dc1e /Build/source/texk/dvipdfm-x/spc_util.c | |
parent | beba2700adbd1ef654015569b2b8724caf06a7f3 (diff) |
Add spot colors support
git-svn-id: svn://tug.org/texlive/trunk@36547 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/spc_util.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/spc_util.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/Build/source/texk/dvipdfm-x/spc_util.c b/Build/source/texk/dvipdfm-x/spc_util.c index ad2d7468c03..3ebfff6c1ed 100644 --- a/Build/source/texk/dvipdfm-x/spc_util.c +++ b/Build/source/texk/dvipdfm-x/spc_util.c @@ -145,6 +145,21 @@ spc_read_color_color (struct spc_env *spe, pdf_color *colorspec, struct spc_arg } else { pdf_color_graycolor(colorspec, cv[0]); } + } else if (!strcmp(q, "spot")) { /* Handle spot colors */ + char *color_name = parse_c_ident(&ap->curptr, ap->endptr); + if (!color_name) { + spc_warn(spe, "No valid spot color name specified?"); + return -1; + } + skip_blank(&ap->curptr, ap->endptr); + nc = spc_util_read_numbers(cv, 1, ap); + if (nc != 1) { + spc_warn(spe, "Invalid value for spot color specification."); + error = -1; + free(color_name); + } else { + pdf_color_spotcolor(colorspec, color_name, cv[0]); + } } else if (!strcmp(q, "hsb")) { nc = spc_util_read_numbers(cv, 3, ap); if (nc != 3) { @@ -704,9 +719,9 @@ spc_util_read_dimtrns (struct spc_env *spe, transform_info *ti, struct spc_arg * #ifdef cmyk #undef cmyk #endif -#define gray(g) {1, {g}} -#define rgb8(r,g,b) {3, {((r)/255.0), ((g)/255.0), ((b)/255.0), 0.0}} -#define cmyk(c,m,y,k) {4, {(c), (m), (y), (k)}} +#define gray(g) {1, NULL, {g}} +#define rgb8(r,g,b) {3, NULL, {((r)/255.0), ((g)/255.0), ((b)/255.0), 0.0}} +#define cmyk(c,m,y,k) {4, NULL, {(c), (m), (y), (k)}} static struct colordef_ { |