From db2477c99efe052b36f6f42d0e8666d5de71fcd0 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 9 Apr 2018 21:14:28 +0000
Subject: adjustbox (9apr18)

git-svn-id: svn://tug.org/texlive/trunk@47405 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def | 116 +++++++++++++++++++--
 1 file changed, 109 insertions(+), 7 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def')

diff --git a/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def b/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def
index b643bf5bd1b..4bd2f36c001 100644
--- a/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.def
+++ b/Master/texmf-dist/tex/latex/adjustbox/tc-dvips.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,13 +17,12 @@
 %% tc-dvips.def, tc-pdftex.def, tc-pgf.def and tc-xetex.def.
 %% Further author information are located in the .def files.
 %%
-\ProvidesFile{tc-dvips.def}[2012/05/13 v1.0 Clipping driver for dvips]
+\ProvidesFile{tc-dvips.def}[2018/04/08 v2.1 Clipping driver for dvips]
 \def\@cliptoboxdim#1{%
     \setbox#1=\hbox{%
-        \adjsetlength\@tempdima{\ht#1+\dp#1}%
-        \edef\TOTALHEIGHT{-\strip@pt\@tempdima\space}%
-        \edef\DEPTH{\strip@pt\dp#1\space}%
-        \edef\WIDTH{\strip@pt\wd#1\space}%
+        \adjcalc@settobp\WIDTH{\wd#1}%
+        \adjcalc@settobp\DEPTH{\dp#1}%
+        \adjcalc@settobp\TOTALHEIGHT{-\ht#1-\dp#1}%
         \special{%
             ps:
               /mtrxc matrix currentmatrix def
@@ -36,10 +35,113 @@
               newpath
               mtrxc setmatrix
         }%
-        \box#1%
+        \hbox to 0pt{\copy#1\hss}%
         \special{ps: grestore }%
+        \hskip\wd#1%
     }%
 }
+\def\@clipcornersofbox#1#2#3#4#5{%
+    \setbox#1=\hbox{%
+        \adjcalc@settobp\DEPTHmRADIUSBL\@tempdima
+        \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\RADIUSTLmHEIGHT{#2-\ht#1}%
+        \adjcalc@settobp\RADIUSTRmHEIGHT{#3-\ht#1}%
+        \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}%
+        \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#4}%
+        \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}%
+        \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#5}%
+        \special{%
+            ps:
+              /mtrxc matrix currentmatrix def
+              currentpoint gsave
+              translate
+              Resolution 72 div VResolution 72 div
+              scale
+              newpath
+              %0 \DEPTH neg translate
+              %0 \DEPTH \WIDTH \TOTALHEIGHT rectclip
+              0 \RADIUSTLmHEIGHT\space moveto
+              \RADIUSTL\space \RADIUSTLmHEIGHT\space \RADIUSTL\space 180 -90 arc
+              \WIDTHmRADIUSTR\space \HEIGHT\space lineto
+              \WIDTHmRADIUSTR\space \RADIUSTRmHEIGHT\space \RADIUSTR\space -90 0 arc
+              \WIDTH\space \DEPTHmRADIUSBR\space lineto
+              \WIDTHmRADIUSBR\space \DEPTHmRADIUSBR\space \RADIUSBR\space 0 90 arc
+              \RADIUSBL\space \DEPTH\space lineto
+              \RADIUSBL\space \DEPTHmRADIUSBL\space \RADIUSBL\space -270 -180 arc
+              closepath
+              %gsave 0.5 0 0 setrgbcolor stroke grestore
+              clip
+              newpath
+              mtrxc setmatrix
+        }%
+        \hbox to 0pt{\copy#1\hss}%
+        \special{ps: grestore }%
+        \hskip \wd#1%
+    }%
+}
+\def\@rndframearoundbox#1#2#3#4#5{%
+    \setbox#1=\hbox{%
+        \adjsetlength\@tempdima{\fboxsep+.5\fboxrule}%
+        \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+        \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\RADIUSTLmHEIGHT{#2-\ht#1}%
+        \adjcalc@settobp\RADIUSTRmHEIGHT{#3-\ht#1}%
+        \adjcalc@settobp\WIDTHmRADIUSTR{\wd#1-#3}%
+        \adjcalc@settobp\DEPTHmRADIUSBR{\dp#1-#4}%
+        \adjcalc@settobp\WIDTHmRADIUSBR{\wd#1-#4}%
+        \adjcalc@settobp\DEPTHmRADIUSBL{\dp#1-#5}%
+        \adjcalc@settobp\LINEWIDTH{\fboxrule}%
+        %
+        \hbox to 0pt{\copy#1\hss}%
+        \hbox to 0pt{%
+            \color@setgroup
+            \adjbox@rndframe@color
+            \special{%
+                ps:
+                /mtrxc matrix currentmatrix def
+                currentpoint gsave
+                translate
+                Resolution 72 div VResolution 72 div
+                scale
+                newpath
+                %0 \DEPTH neg translate
+                %0 \DEPTH \WIDTH \TOTALHEIGHT rectclip
+                0 \RADIUSTLmHEIGHT moveto
+                \RADIUSTL \RADIUSTLmHEIGHT \RADIUSTL 180 -90 arc
+                \WIDTHmRADIUSTR \HEIGHT lineto
+                \WIDTHmRADIUSTR \RADIUSTRmHEIGHT \RADIUSTR -90 0 arc
+                \WIDTH \DEPTHmRADIUSBR lineto
+                \WIDTHmRADIUSBR \DEPTHmRADIUSBR \RADIUSBR 0 90 arc
+                \RADIUSBL \DEPTH lineto
+                \RADIUSBL \DEPTHmRADIUSBL \RADIUSBL -270 -180 arc
+                closepath
+                \LINEWIDTH setlinewidth
+                stroke
+                newpath
+                mtrxc setmatrix
+                grestore
+            }%
+            \color@endgroup
+        }%
+        \hskip \wd#1%
+    }%
+    \adjsetlength\@tempdima{.5\fboxrule}%
+    \@marginbox#1\@tempdima\@tempdima\@tempdima\@tempdima%
+}
 \endinput
 %%
 %% End of file `tc-dvips.def'.
-- 
cgit v1.2.3

