summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-09 21:14:28 +0000
committerKarl Berry <karl@freefriends.org>2018-04-09 21:14:28 +0000
commitdb2477c99efe052b36f6f42d0e8666d5de71fcd0 (patch)
tree4e039ff9a57a55301741b7fef335580017874c5b /Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
parent20e3b619e46b4054c5e50d58557d23611f8eae38 (diff)
adjustbox (9apr18)
git-svn-id: svn://tug.org/texlive/trunk@47405 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def')
-rw-r--r--Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def109
1 files changed, 94 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def b/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
index 2aa3dc0c21e..ea28e71c1b4 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
+++ b/Master/texmf-dist/tex/latex/adjustbox/tc-xetex.def
@@ -1,4 +1,4 @@
-%% Copyright (C) 2011-2012 by Martin Scharrer <martin@scharrer-online.de>
+%% Copyright (C) 2011-2018 by Martin Scharrer <martin@scharrer-online.de>
%% ----------------------------------------------------------------------
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,24 +17,103 @@
%% tc-dvips.def, tc-pdftex.def, tc-pgf.def and tc-xetex.def.
%% Further author information are located in the .def files.
%%
-\ProvidesFile{tc-xetex.def}[2012/05/13 v1.0 Clipping driver for xetex]
+\ProvidesFile{tc-xetex.def}[2018/04/08 v2.1 Clipping driver for xetex]
\def\@cliptoboxdim#1{%
\setbox#1=\hbox{%
- \Gin@defaultbp\WIDTH{\wd#1}%
- \Gin@defaultbp\DEPTH{\dp#1}%
- \@tempdima\ht#1%
- \advance\@tempdima\dp#1%
- \Gin@defaultbp\TOTALHEIGHT{\@tempdima}%
- \special{pdf:bcontent }%
- \special{%
- pdf:literal direct
- 0 -\DEPTH\space \WIDTH\space \TOTALHEIGHT\space re
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\DEPTH{\dp#1}%
+ \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}%
+ \special{pdf:content q }%
+ \special{pdf:code 0 -\DEPTH \WIDTH \TOTALHEIGHT re W n }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:content q }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \hbox to 0 pt{\copy#1\hss}%
+ \special{pdf:literal direct Q }%
+ \special{pdf:literal direct Q }%
+ \hskip\wd#1%
+ }%
+}
+\def\@clip@bpdimens#1#2#3#4#5{%
+ \adjcalc@settobp\TOTALHEIGHT{\ht#1+\dp#1}%
+ \adjcalc@settobp\HEIGHT{\ht#1}%
+ \adjcalc@settobp\DEPTH{-\dp#1}%
+ \adjcalc@settobp\WIDTH{\wd#1}%
+ \adjcalc@settobp\RADIUSTL{#2}%
+ \adjcalc@settobp\RADIUSTR{#3}%
+ \adjcalc@settobp\RADIUSBR{#4}%
+ \adjcalc@settobp\RADIUSBL{#5}%
+ \adjcalc@settobp\RADIUSTLb{\tc@bezfacn#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTL{\ht#1-#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTLb{\ht#1-\tc@bezfacn#2}%
+ \adjcalc@settobp\HEIGHTmRADIUSTR{\ht#1-#3}%
+ \adjcalc@settobp\HEIGHTmRADIUSTRb{\ht#1-\tc@bezfacn#3}%
+ \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}%
+ \adjcalc@settobp\WIDTHmRADIUSTRb{\wd#1-\tc@bezfacn#3}%
+ \adjcalc@settobp\RADIUSBRmDEPTH{#4-\dp#1}%
+ \adjcalc@settobp\RADIUSBRmDEPTHb{\tc@bezfacn#4-\dp#1}%
+ \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}%
+ \adjcalc@settobp\WIDTHmRADIUSBRb{\wd#1-\tc@bezfacn#4}%
+ \adjcalc@settobp\RADIUSBLmDEPTH{#5-\dp#1}%
+ \adjcalc@settobp\RADIUSBLmDEPTHb{\tc@bezfacn#5-\dp#1}%
+ \adjcalc@settobp\RADIUSBLb{\tc@bezfacn#5}%
+ \adjcalc@settobp\LINEWIDTH{\fboxrule}%
+}
+\def\@clip@roundedboxpath@pdfcode{%
+ 0 \HEIGHTmRADIUSTL m
+ 0 \HEIGHTmRADIUSTLb \RADIUSTLb \HEIGHT \RADIUSTL \HEIGHT c
+ \WIDTHmRADIUSTR \HEIGHT l
+ \WIDTHmRADIUSTRb \HEIGHT \WIDTH \HEIGHTmRADIUSTRb \WIDTH \HEIGHTmRADIUSTR c
+ \WIDTH \RADIUSBRmDEPTH l
+ \WIDTH \RADIUSBRmDEPTHb \WIDTHmRADIUSBRb \DEPTH \WIDTHmRADIUSBR \DEPTH c
+ \RADIUSBL \DEPTH l
+ \RADIUSBLb \DEPTH 0 \RADIUSBLmDEPTHb 0 \RADIUSBLmDEPTH c
+ 0 \RADIUSBLmDEPTH l
+}
+\def\@clipcornersofbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}%
+ \special{pdf:content q }%
+ \special{pdf:literal direct
+ \@clip@roundedboxpath@pdfcode
+ h W n
+ }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:content q }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \hbox to 0pt{\copy#1\hss}%
+ \special{pdf:literal direct Q }%
+ \special{pdf:literal direct Q }%
+ \hskip\wd#1%
+ }%
+}
+\def\@rndframearoundbox#1#2#3#4#5{%
+ \setbox#1=\hbox{%
+ \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+ \@clip@bpdimens{#1}{#2}{#3}{#4}{#5}%
+ %
+ \hbox to 0pt{\copy#1\hss}%
+ \hbox to 0pt{%
+ \color@setgroup
+ \adjbox@rndframe@color
+ \special{pdf:content q }%
+ \special{pdf:literal direct
+ \LINEWIDTH w
+ \@clip@roundedboxpath@pdfcode
+ h s
+ }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:content q }%
+ \special{pdf:literal direct -1 0 0 -1 0 0 cm }%
+ \special{pdf:literal direct Q }%
+ \special{pdf:literal direct Q }%
+ \color@endgroup
}%
- \special{pdf:literal direct W }%
- \special{pdf:literal direct n }%
- \box#1%
- \special{pdf:econtent }%
+ \hskip\wd#1%
}%
+ \adjsetlength\@tempdima{.5\fboxrule}%
+ \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
}
\endinput
%%