diff options
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src/spc_util.c')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/spc_util.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/spc_util.c b/Build/source/texk/xdvipdfmx/src/spc_util.c index fd143e8b0a7..b6c34e2c144 100644 --- a/Build/source/texk/xdvipdfmx/src/spc_util.c +++ b/Build/source/texk/xdvipdfmx/src/spc_util.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvsroot/dvipdfmx/src/spc_util.c,v 1.10 2008/02/13 20:22:21 matthias Exp $ +/* $Header: /home/cvsroot/dvipdfmx/src/spc_util.c,v 1.11 2008/03/01 09:00:31 matthias Exp $ This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. @@ -492,7 +492,10 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a "bbox", /* See "Dvipdfmx User's Manual", p.5 */ #define K_TRN__MATRIX 8 "matrix", -#define K_TRN__PAGE 9 +#undef K__CLIP +#define K__CLIP 9 + "clip", +#define K__PAGE 10 "page", NULL }; @@ -501,6 +504,7 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a has_xscale = has_yscale = has_scale = has_rotate = has_matrix = 0; xscale = yscale = 1.0; rotate = 0.0; + p->flags |= INFO_DO_CLIP; /* default: do clipping */ skip_blank(&ap->curptr, ap->endptr); @@ -578,7 +582,6 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a p->bbox.urx = v[2]; p->bbox.ury = v[3]; p->flags |= INFO_HAS_USER_BBOX; - p->flags |= INFO_DO_CLIP; /* always clip */ } } break; @@ -593,7 +596,19 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a } } break; - case K_TRN__PAGE: + case K__CLIP: + vp = parse_float_decimal(&ap->curptr, ap->endptr); + if (!vp) + error = -1; + else { + if (atof(vp)) + p->flags |= INFO_DO_CLIP; + else + p->flags &= ~INFO_DO_CLIP; + RELEASE(vp); + } + break; + case K__PAGE: { double page; if (page_no && spc_util_read_numbers(&page, 1, spe, ap) == 1) @@ -636,6 +651,10 @@ spc_read_dimtrns_pdfm (struct spc_env *spe, transform_info *p, struct spc_arg *a make_transmatrix(&(p->matrix), 0.0, 0.0, xscale, yscale, rotate); } + if (!(p->flags & INFO_HAS_USER_BBOX)) { + p->flags &= ~INFO_DO_CLIP; /* no clipping needed */ + } + return error; } |