summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx/src
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-07-17 00:48:37 +0000
committerKarl Berry <karl@freefriends.org>2009-07-17 00:48:37 +0000
commit7e12980ced8d2a75813d545a82a766b3ed7c7a9e (patch)
treefaafe067df28da1176351a3725c135f6f26b433c /Build/source/texk/dvipdfmx/src
parent9c793a70c4920855b9b8940dee7dafcb56b5eaa6 (diff)
dvipdfmx 20090708
git-svn-id: svn://tug.org/texlive/trunk@14283 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfmx/src')
-rw-r--r--Build/source/texk/dvipdfmx/src/dvipdfmx.c6
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfximage.c33
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfximage.h6
-rw-r--r--Build/source/texk/dvipdfmx/src/spc_pdfm.c6
4 files changed, 47 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfmx/src/dvipdfmx.c b/Build/source/texk/dvipdfmx/src/dvipdfmx.c
index 4c324a2aca4..44685bb20a0 100644
--- a/Build/source/texk/dvipdfmx/src/dvipdfmx.c
+++ b/Build/source/texk/dvipdfmx/src/dvipdfmx.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/dvipdfmx.c,v 1.76 2009/05/10 17:04:54 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/dvipdfmx.c,v 1.77 2009/07/08 09:33:22 chofchof Exp $
This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
@@ -168,6 +168,7 @@ usage (void)
fprintf (stdout, "\t\tPositive values are always ORed with previously given flags.\n");
fprintf (stdout, "\t\tAnd negative values replace old values.\n");
fprintf (stdout, "-D template\tPS->PDF conversion command line template [none]\n");
+ fprintf (stdout, "-E \t\tEnable DVIPDFM emulation mode\n");
fprintf (stdout, "-K number\tEncryption key bits [40]\n");
fprintf (stdout, "-O number\tSet maximum depth of open bookmark items [0]\n");
fprintf (stdout, "-P number\tSet permission flags for PDF encryption [0x003C]\n");
@@ -530,6 +531,9 @@ do_args (int argc, char *argv[])
}
POP_ARG();
break;
+ case 'E':
+ compat_mode = 1;
+ break;
case 'e':
if (compat_mode) {
WARN("dvipdfm \"-e\" option not supported.");
diff --git a/Build/source/texk/dvipdfmx/src/pdfximage.c b/Build/source/texk/dvipdfmx/src/pdfximage.c
index b51541c8e67..8052e1a9bb0 100644
--- a/Build/source/texk/dvipdfmx/src/pdfximage.c
+++ b/Build/source/texk/dvipdfmx/src/pdfximage.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pdfximage.c,v 1.23 2009/05/03 00:13:04 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pdfximage.c,v 1.25 2009/07/07 11:48:34 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -585,6 +585,37 @@ pdf_ximage_get_resname (int id)
return I->res_name;
}
+int
+pdf_ximage_get_subtype (int id)
+{
+ struct ic_ *ic = &_ic;
+ pdf_ximage *I;
+
+ CHECK_ID(ic, id);
+
+ I = GET_IMAGE(ic, id);
+
+ return I->subtype;
+}
+
+void
+pdf_ximage_set_attr (int id, long width, long height, double xdensity, double ydensity, double llx, double lly, double urx, double ury)
+{
+ struct ic_ *ic = &_ic;
+ pdf_ximage *I;
+
+ CHECK_ID(ic, id);
+
+ I = GET_IMAGE(ic, id);
+ I->attr.width = width;
+ I->attr.height = height;
+ I->attr.xdensity = xdensity;
+ I->attr.ydensity = ydensity;
+ I->attr.bbox.llx = llx;
+ I->attr.bbox.lly = lly;
+ I->attr.bbox.urx = urx;
+ I->attr.bbox.ury = ury;
+}
/* depth...
* Dvipdfm treat "depth" as "yoffset" for pdf:image and pdf:uxobj
diff --git a/Build/source/texk/dvipdfmx/src/pdfximage.h b/Build/source/texk/dvipdfmx/src/pdfximage.h
index 34d4ef2518a..770fd754195 100644
--- a/Build/source/texk/dvipdfmx/src/pdfximage.h
+++ b/Build/source/texk/dvipdfmx/src/pdfximage.h
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/pdfximage.h,v 1.14 2009/05/03 00:13:04 matthias Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/pdfximage.h,v 1.16 2009/07/07 11:48:34 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -87,4 +87,8 @@ pdf_ximage_scale_image (int id,
/* from dvipdfmx.c */
extern void pdf_ximage_disable_ebb (void);
+
+/* from spc_pdfm.c */
+extern void pdf_ximgge_get_subtype (int xobj_id);
+extern void pdf_ximage_set_attr (int xobj_id, long width, long height, double xdensity, double ydensity, double llx, double lly, double urx, double ury);
#endif /* _PDFXIMAGE_H_ */
diff --git a/Build/source/texk/dvipdfmx/src/spc_pdfm.c b/Build/source/texk/dvipdfmx/src/spc_pdfm.c
index beed3752125..ca1595e2ca9 100644
--- a/Build/source/texk/dvipdfmx/src/spc_pdfm.c
+++ b/Build/source/texk/dvipdfmx/src/spc_pdfm.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/spc_pdfm.c,v 1.48 2009/04/29 11:22:19 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/spc_pdfm.c,v 1.50 2009/07/07 11:48:34 chofchof Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -54,6 +54,7 @@
#include "spc_util.h"
#include "spc_pdfm.h"
+#include "dvipdfmx.h"
#define ENABLE_TOUNICODE 1
@@ -1008,6 +1009,9 @@ spc_handler_pdfm_image (struct spc_env *spe, struct spc_arg *args)
pdf_dev_put_image(xobj_id, &ti, spe->x_user, spe->y_user);
if (ident) {
+ if (compat_mode &&
+ pdf_ximage_get_subtype(xobj_id) == PDF_XOBJECT_TYPE_IMAGE)
+ pdf_ximage_set_attr(xobj_id, 1, 1, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0);
addresource(sd, ident, xobj_id);
RELEASE(ident);
}