summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex')
-rw-r--r--Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex144
1 files changed, 119 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
index 255f2c015fe..9a234d42a41 100644
--- a/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
+++ b/Master/texmf-dist/tex/latex/tcolorbox/tcbskins.code.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package tcolorbox - version 2.71 (2014/02/21)
+%% The LaTeX package tcolorbox - version 2.72 (2014/03/18)
%% tcbskins.code.tex: Code for colorboxes with different skins
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README
%%
-\tcb@set@library@version{2.71}
+\tcb@set@library@version{2.72}
\RequirePackage{tikz}[2010/10/13]
@@ -167,18 +167,18 @@
% draw special versions
-\def\tcb@drawspec@UT#1{%
- \tcb@pathbase{#1,interior@style}{segmentation.west}{interior.north east}%
+\def\tcb@drawspec@UT{%
+ \tcb@pathbase{tcb@fill@interior}{segmentation.west}{interior.north east}%
{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}
-\def\tcb@drawspec@UR#1{%
- \tcb@pathbase{#1,interior@style}{segmentation.west}{interior.north east}%
+\def\tcb@drawspec@UR{%
+ \tcb@pathbase{tcb@fill@interior}{segmentation.west}{interior.north east}%
{\tcb@arc@zpt}{\tcb@arc@ins}{\tcb@arc@ins}{\tcb@arc@zpt}%
}
-\def\tcb@drawspec@US#1{%
- \tcb@pathbase{#1,interior@style}{segmentation.west}{interior.east|-frame.north}%
+\def\tcb@drawspec@US{%
+ \tcb@pathbase{tcb@fill@interior}{segmentation.west}{interior.east|-frame.north}%
{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}
@@ -223,7 +223,7 @@
}
\def\tcb@drawspec@T{%
- \tcb@pathbase{top color=\kvtcb@colframe,bottom color=\kvtcb@colback}{[yshift=-0.01pt]interior.north west}{[yshift=0.01pt]title.south east}%
+ \tcb@pathbase{top color=\kvtcb@colframe,bottom color=\kvtcb@colback,fill opacity=\kvtcb@opacitybacktitle}{[yshift=-0.01pt]interior.north west}{[yshift=0.01pt]title.south east}%
{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@zpt}%
}
@@ -419,7 +419,7 @@
\ifcase\tcb@segment@state%
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@path}%
\or%
- \tcb@drawspec@UT{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
\else%
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@path}%
\fi%
@@ -431,7 +431,7 @@
\ifcase\tcb@segment@state%
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@path}%
\or%
- \tcb@drawspec@UR{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UR%
\else%
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@path}%
\fi%
@@ -452,7 +452,7 @@
\ifcase\tcb@segment@state%
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathfirst}%
\or%
- \tcb@drawspec@UT{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
\else%
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathfirst}%
\fi%
@@ -464,7 +464,7 @@
\ifcase\tcb@segment@state%
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathfirst}%
\or%
- \tcb@drawspec@UR{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UR%
\else%
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathfirst}%
\fi%
@@ -483,7 +483,7 @@
\ifcase\tcb@segment@state%
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathmiddle}%
\or%
- \tcb@drawspec@UT{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
\else%
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathmiddle}%
\fi%
@@ -495,7 +495,7 @@
\ifcase\tcb@segment@state%
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathmiddle}%
\or%
- \tcb@drawspec@US{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@US%
\else%
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathmiddle}%
\fi%
@@ -514,7 +514,7 @@
\ifcase\tcb@segment@state
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithtitle@pathlast}%
\or%
- \tcb@drawspec@UT{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@UT%
\else%
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithtitle@pathlast}%
\fi%
@@ -526,7 +526,7 @@
\ifcase\tcb@segment@state%
{\tcb@spec{fill=\kvtcb@colback}\tcb@drawwithouttitle@pathlast}%
\or%
- \tcb@drawspec@US{fill=\kvtcb@colback}%
+ \tcb@spec{fill=\kvtcb@colback}\tcb@drawspec@US%
\else
{\tcb@spec{fill=\kvtcb@colbacklower}\tcb@drawwithouttitle@pathlast}%
\fi%
@@ -546,7 +546,7 @@
interior titled code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1%
- \tcb@drawspec@UT{beamer@color}%
+ \tcb@spec{beamer@color}\tcb@drawspec@UT%
\else%
{\tcb@spec{beamer@color}\tcb@drawwithtitle@path}%
\fi%
@@ -557,7 +557,7 @@
interior code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1
- \tcb@drawspec@UR{beamer@color}%
+ \tcb@spec{beamer@color}\tcb@drawspec@UR%
\else%
{\tcb@spec{beamer@color}\tcb@drawwithouttitle@path}%
\fi%
@@ -574,7 +574,7 @@
interior titled code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1%
- \tcb@drawspec@UT{beamer@color}%
+ \tcb@spec{beamer@color}\tcb@drawspec@UT%
\else%
{\tcb@spec{beamer@color}\tcb@drawwithtitle@pathfirst}%
\fi%
@@ -585,7 +585,8 @@
interior code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1
- \tcb@drawspec@UR{beamer@color}\else%
+ \tcb@spec{beamer@color}\tcb@drawspec@UR%
+ \else%
{\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathfirst}%
\fi%
\else%
@@ -599,7 +600,7 @@
interior titled code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1%
- \tcb@drawspec@UT{beamer@color}%
+ \tcb@spec{beamer@color}\tcb@drawspec@UT%
\else%
{\tcb@spec{beamer@color}\tcb@drawwithtitle@pathmiddle}%
\fi%
@@ -610,7 +611,7 @@
interior code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1
- \tcb@drawspec@US{beamer@color}%
+ \tcb@spec{beamer@color}\tcb@drawspec@US%
\else%
{\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathmiddle}%
\fi%
@@ -625,7 +626,7 @@
interior titled code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1%
- \tcb@drawspec@UT{beamer@color}%
+ \tcb@spec{beamer@color}\tcb@drawspec@UT%
\else%
{\tcb@spec{beamer@color}\tcb@drawwithtitle@pathlast}%
\fi%
@@ -636,7 +637,7 @@
interior code={%
\iftcb@lowerseparated%
\ifnum\tcb@segment@state=1
- \tcb@drawspec@US{beamer@color}%
+ \tcb@spec{beamer@color}\tcb@drawspec@US%
\else%
{\tcb@spec{beamer@color}\tcb@drawwithouttitle@pathlast}%
\fi%
@@ -911,6 +912,99 @@
\end{tcbclipinterior}%
}
+
+\def\tcb@process@ppbb{%
+ \pgf@process{\pgfpointanchor{path picture bounding box}{south west}}%
+ \pgf@xa\pgf@x\pgf@ya\pgf@y%
+ \pgf@process{\pgfpointanchor{path picture bounding box}{north east}}%
+ \pgf@xb\pgf@x\pgf@yb\pgf@y%
+ \pgfsetfillopacity{\tcb@tikz@fill@graphics@opacity}%
+}
+
+\def\tcb@process@ppbb@wh{%
+ \tcb@process@ppbb%
+ \tcbdimto\tcb@ppbb@width{\pgf@xb-\pgf@xa}%
+ \tcbdimto\tcb@ppbb@height{\pgf@yb-\pgf@ya}%
+}
+
+\def\tcb@set@waterbox@to@graphics#1{%
+ \setbox\tcb@waterbox=\hbox{\pgfinterruptpicture{\expandafter\includegraphics\expandafter[\tcb@tikz@fill@graphics@options]{#1}}\endpgfinterruptpicture}%
+}
+
+\tikzset{%
+ fill image opacity/.store in=\tcb@tikz@fill@graphics@opacity,%
+ fill image opacity=1.0,%
+ fill image options/.store in=\tcb@tikz@fill@graphics@options,%
+ fill image options=,%
+ fill plain image/.style={path picture={%
+ \node at (path picture bounding box.center) {\expandafter\includegraphics\expandafter[\tcb@tikz@fill@graphics@options]{#1}};
+ }},
+ fill stretch image/.style={path picture={%
+ \tcb@process@ppbb@wh%
+ \node at (path picture bounding box.center) {\expandafter\includegraphics\expandafter[\tcb@tikz@fill@graphics@options,width=\tcb@ppbb@width,height=\tcb@ppbb@height]{#1}};
+ }},
+ fill overzoom image/.style={path picture={%
+ \tcb@process@ppbb@wh%
+ \tcb@set@waterbox@to@graphics{#1}%
+ \tcb@setratiorobust\tcb@scale@x{\tcb@ppbb@width}{\wd\tcb@waterbox}%
+ \tcb@setratiorobust\tcb@scale@y{\tcb@ppbb@height}{\ht\tcb@waterbox+\dp\tcb@waterbox}%
+ \ifdim\dimexpr\tcb@scale@x pt\relax>\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi%
+ \node at (path picture bounding box.center) {\scalebox{\tcb@scale@x}[\tcb@scale@y]{\box\tcb@waterbox}};%
+ }},
+ fill zoom image/.style={path picture={%
+ \tcb@process@ppbb@wh%
+ \tcb@set@waterbox@to@graphics{#1}%
+ \tcb@setratiorobust\tcb@scale@x{\tcb@ppbb@width}{\wd\tcb@waterbox}%
+ \tcb@setratiorobust\tcb@scale@y{\tcb@ppbb@height}{\ht\tcb@waterbox+\dp\tcb@waterbox}%
+ \ifdim\dimexpr\tcb@scale@x pt\relax<\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi%
+ \node at (path picture bounding box.center) {\scalebox{\tcb@scale@x}[\tcb@scale@y]{\box\tcb@waterbox}};%
+ }},
+ fill shrink image/.style={path picture={%
+ \tcb@process@ppbb@wh%
+ \tcb@set@waterbox@to@graphics{#1}%
+ \tcb@setratiorobust\tcb@scale@x{\tcb@ppbb@width}{\wd\tcb@waterbox}%
+ \tcb@setratiorobust\tcb@scale@y{\tcb@ppbb@height}{\ht\tcb@waterbox+\dp\tcb@waterbox}%
+ \ifdim\dimexpr\tcb@scale@x pt\relax<\dimexpr\tcb@scale@y pt\relax\let\tcb@scale@y=\tcb@scale@x\else\let\tcb@scale@x=\tcb@scale@y\fi%
+ \ifdim\dimexpr\tcb@scale@x pt\relax<1pt\relax%
+ \node at (path picture bounding box.center) {\scalebox{\tcb@scale@x}[\tcb@scale@y]{\box\tcb@waterbox}};%
+ \else%
+ \node at (path picture bounding box.center) {\box\tcb@waterbox};%
+ \fi%
+ }},
+ fill tile image/.style={path picture={%
+ \tcb@process@ppbb%
+ \tcb@set@waterbox@to@graphics{#1}%
+ \tcbdimto\tcb@ppbb@tilew{\wd\tcb@waterbox}%
+ \tcbdimto\tcb@ppbb@tileh{\ht\tcb@waterbox+\dp\tcb@waterbox}%
+ \pgf@xc\pgf@xa\pgf@yc\pgf@yb%
+ \pgfutil@loop%
+ \pgfutil@loop%
+ \pgftext[x=\pgf@xc,y=\pgf@yc,left,top]{\copy\tcb@waterbox}%
+ \ifdim\pgf@xc<\pgf@xb%
+ \advance\pgf@xc\tcb@ppbb@tilew%
+ \pgfutil@repeat%
+ \ifdim\pgf@yc>\pgf@ya%
+ \advance\pgf@yc-\tcb@ppbb@tileh%
+ \pgf@xc\pgf@xa%
+ \pgfutil@repeat%
+ }},%
+ fill plain image*/.style 2 args={fill image options={#1},fill plain image={#2}},%
+ fill stretch image*/.style 2 args={fill image options={#1},fill stretch image={#2}},%
+ fill overzoom image*/.style 2 args={fill image options={#1},fill overzoom image={#2}},%
+ fill zoom image*/.style 2 args={fill image options={#1},fill zoom image={#2}},%
+ fill shrink image*/.style 2 args={fill image options={#1},fill shrink image={#2}},%
+ fill tile image*/.style 2 args={fill image options={#1},fill tile image={#2}},%
+}
+
+\tcbset{%
+ frame style image/.style={frame style={fill=none,fill stretch image={#1}}},
+ frame style tile/.style 2 args={frame style={fill=none,fill tile image*={#1}{#2}}},
+ interior style image/.style={interior style={fill=none,fill stretch image={#1}}},
+ interior style tile/.style 2 args={interior style={fill=none,fill tile image*={#1}{#2}}},
+ title style image/.style={title style={fill=none,fill stretch image={#1}}},
+ title style tile/.style 2 args={title style={fill=none,fill tile image*={#1}{#2}}},
+}
+
\tcbset{%
clip title/.is choice,
clip title/true/.code={\let\tcb@tdraw@title=\tcb@tdraw@title@clip},