summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/media9/pdfbase.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/media9/pdfbase.sty')
-rw-r--r--macros/latex/contrib/media9/pdfbase.sty76
1 files changed, 38 insertions, 38 deletions
diff --git a/macros/latex/contrib/media9/pdfbase.sty b/macros/latex/contrib/media9/pdfbase.sty
index b30650dc99..cde66c506c 100644
--- a/macros/latex/contrib/media9/pdfbase.sty
+++ b/macros/latex/contrib/media9/pdfbase.sty
@@ -159,8 +159,8 @@
\RequirePackage{expl3}
\RequirePackage{l3keys2e}
-\def\g@pbs@date@tl{2020/03/25}
-\def\g@pbs@version@tl{0.41}
+\def\g@pbs@date@tl{2020/05/06}
+\def\g@pbs@version@tl{0.42}
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
{driver independent access to low-level PDF features}
@@ -676,7 +676,7 @@
\int_gincr:N\g_pbs_obj_int
}
- \cs_new_protected_nopar:Nn\pbs_pdfrefxform:n{\special{pdf:uxobj~#1}}% #1: xform obj ID
+ \cs_new_protected_nopar:Nn\pbs_pdfrefxform:n{\special{pdf:uxobj~#1}}
\cs_new_protected_nopar:Nn\pbs_pdfximage:n{
\filename@parse{#1}
@@ -686,9 +686,7 @@
||\str_if_eq_p:Vn\l_pbs_ext_tl{jpg}
||\str_if_eq_p:Vn\l_pbs_ext_tl{jpeg}
}{
- \special{pdf:image~@pbs@obj\int_use:N\g_pbs_obj_int\space
- %move initial display off the page
- matrix~0.000001~0~0~0.000001~-1000000~-1000000~(#1)}
+ \special{pdf:image~@pbs@obj\int_use:N\g_pbs_obj_int\space hide~(#1)}
\tl_gset:Nx\g_pbs_pdflastximage_tl{@pbs@obj\int_use:N\g_pbs_obj_int}
\int_gincr:N\g_pbs_obj_int
}{
@@ -698,7 +696,8 @@
}
}
- \cs_new_protected_nopar:Nn\pbs_pdfcatalog:n{\special{pdf:put~@catalog~<<#1>>}}
+ \cs_new_protected_nopar:Nn\pbs_pdfcatalog:n{
+ \special{pdf:put~@catalog~<<#1>>}}
\int_new:N\g_pbs_oc_int %object ID
\cs_new_protected_nopar:Nn\pbs_pdfbdc:nn{
@@ -761,7 +760,8 @@
\special{dvisvgm:raw~{?nl}</g>{?nl}</defs>}
}
}
- \tl_gset:Nx\g_pbs_pdflastxform_tl{\g_pbs_hash_tl pbs@obj\int_use:N\g_pbs_obj_int}
+ \tl_gset:Nx\g_pbs_pdflastxform_tl{
+ \g_pbs_hash_tl pbs@obj\int_use:N\g_pbs_obj_int}
\int_gincr:N\g_pbs_obj_int
}
@@ -771,9 +771,6 @@
}
}{
%dvips
- \bool_new:N\g_pbs_powerdot_bool %to cope with some powerdot oddity
- \@ifclassloaded{powerdot}{\bool_gset_true:N\g_pbs_powerdot_bool}{}
-
\sys_if_engine_pdftex:TF{
\cs_new_nopar:Nn\pbs_filedump:nnn{\pdffiledump~offset~#1~length~#2~{#3}}
}{
@@ -784,8 +781,8 @@
}
\AtBeginDocument{
- \@ifpackageloaded{hyperref}{}{
- %define `?pdfmark' operator as in file pdfmark.def from package `hyperref'
+ \@ifpackageloaded{hyperref}{}{ % `hyperref'
+ %define `?pdfmark' operator as in file pdfmark.def from package
\special{!~
systemdict~/pdfmark~known
{
@@ -1088,9 +1085,9 @@
output.
}
- \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources are
- %this allows nesting \pbs_pdfxform:nnnnn{...} % managed by pdfmarks)
- \pbs_special:n{
+ \cs_new_protected_nopar:Nn\pbs_pdfxform:nnnnn{ % #1, #3 not used (resources
+ %this allows nesting \pbs_pdfxform:nnnnn{...} % are managed
+ \pbs_special:n{ % automaticlly)
gsave~
pbs@xform@level~0~eq~{/pbs@ctm@0~matrix~currentmatrix~def}~if~
pbs@ctm@0~setmatrix~
@@ -1132,24 +1129,28 @@
\pbs_special:n{
gsave~
currentpoint~/pbs@cury~exch~def~/pbs@curx~exch~def~
- %translate graphics to upper left page corner
- \bool_if:nF{\g_pbs_powerdot_bool||\g_pbs_lscape_bool}{
- {
- pbs@llx~neg~pbs@ury~neg~translate~
- Resolution~neg~VResolution~neg~translate %one inch left, one inch up
- }?pdfmark~
- }
+ %translate graphics to upper left page corner, so we have the whole
+ %clipbox (i. e. page area) available for distilling; outlying parts
+ %get clipped
+ {
+ clippath~pathbbox~pop~pop~
+ pbs@ury~sub~exch~pbs@llx~sub~exch~translate~
+ }?pdfmark~
+ %move origin (0,0) to the current position
+ gsave~pbs@curx~pbs@cury~translate~
+ %distillation-bbox left and top coords
+ clippath~pathbbox~pop~pop~/pbs@bbox@top~exch~def~
+ /pbs@bbox@left~exch~def~
%distill graphics to XObject
- gsave~pbs@curx~pbs@cury~translate~ %move origin (0,0) to the current
- mark~ %position
- /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}
+ mark~
+ /_objdef~{pbs@obj\int_use:N\g_pbs_obj_int}~
/BBox~[
- pbs@llx~pbs@curx~sub~pbs@lly~pbs@cury~sub~
- pbs@urx~pbs@curx~sub~pbs@ury~pbs@cury~sub
- ]
+ pbs@bbox@left~pbs@bbox@top~pbs@bbox@left~pbs@urx~
+ pbs@llx~sub~add~pbs@bbox@top~pbs@lly~pbs@ury~sub~add
+ ]~
%insert additional dict entries (the Distiller way)
\str_if_eq:eeF{\l_tmpa_tl}{}{
- product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse
+ product~(Distiller)~search~{pop~pop~pop~\l_tmpa_tl}{pop}ifelse~
}
/BP~pdfmark~grestore~
\int_compare:nT{#2>\c_zero_int}{
@@ -1157,17 +1158,16 @@
{
isls{%landscape mode (powerdot, geometry /w landscape option)
/pbs@dxdy~{
- pbs@urx~pbs@llx~sub~abs~
- pbs@ury~pbs@lly~sub~abs~div
- }~bind~def
- /pbs@dydx~{1~pbs@dxdy~div}~bind~def
- /pbs@cx~{pbs@urx~pbs@llx~add~2~div}~bind~def
- /pbs@cy~{pbs@ury~pbs@lly~add~2~div}~bind~def
+ pbs@urx~pbs@llx~sub~abs~pbs@ury~pbs@lly~sub~abs~div
+ }~bind~def~
+ /pbs@dydx~{1~pbs@dxdy~div}~bind~def~
+ /pbs@cx~{pbs@urx~pbs@llx~add~2~div}~bind~def~
+ /pbs@cy~{pbs@ury~pbs@lly~add~2~div}~bind~def~
%graphics needs to be rescaled for some reason ...
[pbs@dxdy~0~0~pbs@dydx~1~pbs@dxdy~sub~pbs@cx~mul~
- 1~pbs@dydx~sub~pbs@cy~mul]~concat
+ 1~pbs@dydx~sub~pbs@cy~mul]~concat~
%... rotated by 270 degrees ...
- [0~-1~1~0~pbs@cx~pbs@cy~sub~pbs@cx~pbs@cy~add]~concat
+ [0~-1~1~0~pbs@cx~pbs@cy~sub~pbs@cx~pbs@cy~add]~concat~
%... and flipped around vertical axis
[-1~0~0~1~pbs@llx~pbs@urx~add~0]~concat
}{%flip around horizontal axis in portrait mode