diff options
author | Karl Berry <karl@freefriends.org> | 2010-12-30 23:41:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-12-30 23:41:51 +0000 |
commit | 23e10ea724490edf980413190b4a9ae00442ef40 (patch) | |
tree | 1e27ebee0f918b134aa696faf5a8360fbcb82bfa /Master/texmf-dist/tex/latex/productbox | |
parent | 7fac1c4b6b98fa7da1222c407b622dea1bd81590 (diff) |
productbox 1.1 (30dec10)
git-svn-id: svn://tug.org/texlive/trunk@20886 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/productbox')
-rw-r--r-- | Master/texmf-dist/tex/latex/productbox/productbox.sty | 654 |
1 files changed, 654 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/productbox/productbox.sty b/Master/texmf-dist/tex/latex/productbox/productbox.sty new file mode 100644 index 00000000000..4a12c20bf50 --- /dev/null +++ b/Master/texmf-dist/tex/latex/productbox/productbox.sty @@ -0,0 +1,654 @@ +%% +%% This is file `productbox.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% productbox.dtx (with options: `style') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from productbox.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file productbox.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%%^^A $Id: productbox.dtx 8333 2010-12-29 19:58:06Z gene $ +%%^^A%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Purpose: +%% productbox.dtx provides a style file for typesetting a +%% three-dimensional product box. This product box can be rendered +%% as it is standing on a surface and some light is shed onto it. +%% Alternatively it can be typeset as a wireframe to be cut out +%% and glued together. This will lead to a physical product box. +%% +%% Documentation: +%% The documentation can be generated from the original file +%% productbox.dtx with the doc style/package. LaTeX the file +%% productbox.dtx to get the full documentation in pdf format. +%% +%% Prerequisite: +%% This package needs TikZ to be present at least in version 2.0. +%% +%% Author: Gerd Neugebauer +%% Im Lerchelsb\"ohl 5 +%% 64521 Gro\ss-Gerau +%% Mail: gene@gerd-neugebauer.de +%% +%% Copyright (C) 2010 Gerd Neugebauer +%% +%% productbox.dtx is distributed in the hope that it will be useful, +%% but WITHOUT ANY WARRANTY. No author or distributor accepts +%% responsibility to anyone for the consequences of using it or for +%% whether it serves any particular purpose or works at all, unless +%% he says so in writing. +%% +%% Everyone is granted permission to copy, modify and redistribute +%% productbox.dtx, provided this copyright notice is preserved and +%% any modifications are indicated. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\begingroup + \def\ProductBox@VC$#1: #2 #3${#2} + \def\ProductBox@VCdate$#1: #2-#3-#4 #5${#2/#3/#4} + \xdef\fileversion{1.1} + \xdef\filerevision{\ProductBox@VC$Revision: 8333 $} + \xdef\filedate{\ProductBox@VCdate + $Date: 2010-12-29 20:58:06 +0100 (Mi, 29 Dez 2010) $} + \xdef\filename{productbox.dtx} +\endgroup +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{productbox}[\filedate Another type of boxes...] +\RequirePackage{keyval} +\RequirePackage{tikz} +\usetikzlibrary{calc} +\usetikzlibrary{fadings} +\define@key{ProductBox}{scale}{% + \def\ProductBox@scale{#1}} +\define@key{ProductBox}{width}{% + \def\ProductBox@x{#1}} +\define@key{ProductBox}{height}{% + \def\ProductBox@y{#1}} +\define@key{ProductBox}{depth}{% + \def\ProductBox@z{#1}} +\define@key{ProductBox}{clean}[true]{% + \csname ProductBox@clean#1\endcsname} +\define@key{ProductBox}{flat}[true]{% + \def\ProductBox@style{flat}} +\define@key{ProductBox}{fold}[true]{% + \def\ProductBox@style{fold}} +\define@key{ProductBox}{3d}[true]{% + \def\ProductBox@style{threeD}} +\define@key{ProductBox}{3D}[true]{% + \def\ProductBox@style{threeD}} +\define@key{ProductBox}{threeD}[true]{% + \def\ProductBox@style{threeD}} +\define@key{ProductBox}{top}[true]{% + \def\ProductBox@style{top}} +\define@key{ProductBox}{bottom}[true]{% + \def\ProductBox@style{bottom}} +\define@key{ProductBox}{front}[true]{% + \def\ProductBox@style{front}} +\define@key{ProductBox}{back}[true]{% + \def\ProductBox@style{back}} +\define@key{ProductBox}{left}[true]{% + \def\ProductBox@style{left}} +\define@key{ProductBox}{right}[true]{% + \def\ProductBox@style{right}} +\define@key{ProductBox}{empty}[true]{% + \def\ProductBox@style{empty}} +\define@key{ProductBox}{style}{% + \def\ProductBox@style{#1}} +\define@key{ProductBox}{shadow}[true]{% + \csname ProductBox@shadow#1\endcsname} +\define@key{ProductBox}{mirror}[true]{% + \csname ProductBox@mirror#1\endcsname} +\define@key{ProductBox}{flare}[true]{% + \csname ProductBox@flare#1\endcsname} +\define@key{ProductBox}{flareDiameter}{% + \def\ProductBox@flareDiameter{#1}} +\define@key{ProductBox}{edgeColor}{% + \def\productBox@edgeColor{#1}} +\define@key{ProductBox}{view}{% + \@nameuse{ProductBox@View@#1}} +\define@key{ProductBox}{earSize}{% + \def\ProductBox@earSize{#1}} +\define@key{ProductBox}{foldLine}{% + \def\ProductBox@foldLine{#1}} +\define@key{ProductBox}{foldOpacity}{% + \def\ProductBox@foldOpacity{#1}} +\define@key{ProductBox}{faceSep}{% + \def\ProductBox@FaceSep{#1}} +\newbox\ProductBox@Front +\newbox\ProductBox@Left +\newbox\ProductBox@Top +\newbox\ProductBox@Right +\newbox\ProductBox@Bottom +\newbox\ProductBox@Back +\newcommand\ProductBoxSet[1]{\setkeys{ProductBox}{#1}} +\newcommand\ProductBox@style{threeD} +\newcommand\ProductBox@x{88mm} +\newcommand\ProductBox@y{100mm} +\newcommand\ProductBox@z{30mm} +\newif\ifProductBox@clean +\newif\ifProductBox@active +\newif\ifProductBox@clip \ProductBox@cliptrue +\newcommand\ProductBox@FaceSep{1em} +\newenvironment{ProductBox}[1][]{% + \setkeys{ProductBox}{#1}% + \ifProductBox@clean + \global\setbox\ProductBox@Front\hbox{}% + \global\setbox\ProductBox@Back\hbox{}% + \global\setbox\ProductBox@Left\hbox{}% + \global\setbox\ProductBox@Right\hbox{}% + \global\setbox\ProductBox@Top\hbox{}% + \global\setbox\ProductBox@Bottom\hbox{}% + \fi + \ifProductBox@active + \errmessage{Trying to use an environment ProductBox inside the + environment ProductBox. This is not allowed.}% + \else + \ProductBox@activetrue + \fi + \let\Front\undefined \let\endFront\undefined + \let\Back\undefined \let\endBack\undefined + \let\Left\undefined \let\endLeft\undefined + \let\Right\undefined \let\endRight\undefined + \let\Top\undefined \let\endTop\undefined + \let\Bottom\undefined \let\endBottom\undefined + \let\FrontFace\undefined \let\endFrontFace\undefined + \let\BackFace\undefined \let\endBackFace\undefined + \let\LeftFace\undefined \let\endLeftFace\undefined + \let\RightFace\undefined \let\endRightFace\undefined + \let\TopFace\undefined \let\endTopFace\undefined + \let\BottomFace\undefined \let\endBottomFace\undefined + \newenvironment{Front}{\ProductBox@Start\ProductBox@Front + (\ProductBox@x,\ProductBox@y)}{\ProductBox@End}% + \newenvironment{Back}{\ProductBox@Start\ProductBox@Back + (\ProductBox@x,\ProductBox@y)}{\ProductBox@End}% + \newenvironment{Left}{\ProductBox@Start\ProductBox@Left + (\ProductBox@z,\ProductBox@y)}{\ProductBox@End}% + \newenvironment{Right}{\ProductBox@Start\ProductBox@Right + (\ProductBox@z,\ProductBox@y)}{\ProductBox@End}% + \newenvironment{Top}{\ProductBox@Start\ProductBox@Top + (\ProductBox@x,\ProductBox@z)}{\ProductBox@End}% + \newenvironment{Bottom}{\ProductBox@Start\ProductBox@Bottom( + \ProductBox@x,\ProductBox@z)}{\ProductBox@End}% + \newenvironment{FrontFace}[1][white]{\ProductBox@StartFace\ProductBox@Front + {\ProductBox@x}{\ProductBox@y}{##1}}{\ProductBox@EndFace}% + \newenvironment{BackFace}[1][white]{\ProductBox@StartFace\ProductBox@Back + {\ProductBox@x}{\ProductBox@y}{##1}}{\ProductBox@EndFace}% + \newenvironment{LeftFace}[1][white]{\ProductBox@StartFace\ProductBox@Left + {\ProductBox@z}{\ProductBox@y}{##1}}{\ProductBox@EndFace}% + \newenvironment{RightFace}[1][white]{\ProductBox@StartFace\ProductBox@Right + {\ProductBox@z}{\ProductBox@y}{##1}}{\ProductBox@EndFace}% + \newenvironment{TopFace}[1][white]{\ProductBox@StartFace\ProductBox@Top + {\ProductBox@x}{\ProductBox@z}{##1}}{\ProductBox@EndFace}% + \newenvironment{BottomFace}[1][white]{\ProductBox@StartFace\ProductBox@Bottom + {\ProductBox@x}{\ProductBox@z}{##1}}{\ProductBox@EndFace}% + \ignorespacesafterend +}{% + \@ifundefined{ProductBox@style@\ProductBox@style}{% + \errmessage{Box style '\ProductBox@style' for ProductBox is unknown}% + }{% + \@ifundefined{ProductBox@scale}{% + \@nameuse{ProductBox@style@\ProductBox@style}}{% + \scalebox{\ProductBox@scale}% + {\@nameuse{ProductBox@style@\ProductBox@style}} + }}% + \ProductBox@activefalse + \ignorespacesafterend +} +\def\ProductBox@Start#1(#2){% + \global\setbox#1\hbox\bgroup\begin{tikzpicture}% + \ifProductBox@clip \clip rectangle (#2); \fi + }% +\newcommand\ProductBox@End{\end{tikzpicture}\egroup\ignorespacesafterend} +\newcommand\ProductBox@StartFace[4]{% + \let\ProductBox@@box#1% + \def\ProductBox@@w{#2}% + \def\ProductBox@@h{#3}% + \def\ProductBox@@args{[#4]}% + \@tempdima=#2 + \advance\@tempdima-\ProductBox@FaceSep + \advance\@tempdima-\ProductBox@FaceSep + \setbox#1\hbox\bgroup\begin{minipage}{\the\@tempdima}% + \ignorespaces +} +\newcommand\ProductBox@EndFace{\end{minipage}\egroup + \global\setbox\ProductBox@@box=\hbox{\begin{tikzpicture} + \ifProductBox@clip \clip rectangle (\ProductBox@@w,\ProductBox@@h); \fi + \expandafter\fill \ProductBox@@args rectangle(\ProductBox@@w,\ProductBox@@h); + \draw (.5*\ProductBox@@w,.5*\ProductBox@@h) + node[inner sep=0pt] {\box\ProductBox@@box}; + \end{tikzpicture}}\ignorespacesafterend} +\newcommand\ProductBox@style@empty{} +\newcommand\ProductBox@style@flat{% + \par\noindent + \hspace*{\ProductBox@z}\kern1mm \copy\ProductBox@Top\\[1ex] + \copy\ProductBox@Left\kern1mm \copy\ProductBox@Front\kern1mm + \copy\ProductBox@Right\kern1mm \copy\ProductBox@Back\\[1ex] + \hspace*{\ProductBox@z}\kern1mm \copy\ProductBox@Bottom\par +} +\newcommand\ProductBox@style@front{% + \copy\ProductBox@Front +} +\newcommand\ProductBox@style@back{%class + \copy\ProductBox@Back +} +\newcommand\ProductBox@style@left{% + \copy\ProductBox@Left +} +\newcommand\ProductBox@style@right{% + \copy\ProductBox@Right +} +\newcommand\ProductBox@style@top{% + \copy\ProductBox@Top +} +\newcommand\ProductBox@style@bottom{% + \copy\ProductBox@Bottom +} +\newcommand\ProductBox@earSize{12mm} +\newcommand\ProductBox@foldLine{white!80!black} +\newcommand\ProductBox@foldOpacity{.5} +\newcommand\ProductBox@style@fold{% + \begin{tikzpicture}[sw/.style={anchor=south west, + inner sep=0pt}, + se/.style={anchor=south east, + inner sep=0pt}, + nw/.style={anchor=north west, + inner sep=0pt}, + num/.style={circle, + fill=white!90!black, + fill opacity=.5, + font=\tiny\bfseries\sffamily}] + \begin{scope} + \clip rectangle (\ProductBox@z,\ProductBox@y); + \draw node[sw]{\copy\ProductBox@Left}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + rectangle (\ProductBox@z,\ProductBox@y); + \end{scope} + \begin{scope}[xshift=\ProductBox@z] + \clip rectangle (\ProductBox@x,\ProductBox@y); + \draw node[sw]{\copy\ProductBox@Front}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + rectangle (\ProductBox@x,\ProductBox@y); + \end{scope} + \begin{scope}[xshift=\ProductBox@z+\ProductBox@x] + \clip rectangle (\ProductBox@z,\ProductBox@y); + \draw node[sw]{\copy\ProductBox@Right}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + rectangle (\ProductBox@z,\ProductBox@y); + \end{scope} + \begin{scope}[xshift=\ProductBox@x+2*\ProductBox@z] + \clip rectangle (\ProductBox@x,\ProductBox@y); + \draw node[sw]{\copy\ProductBox@Back}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + rectangle (\ProductBox@x,\ProductBox@y); + \end{scope} + \begin{scope}[xshift=\ProductBox@z,yshift=\ProductBox@y] + \clip rectangle (\ProductBox@x,\ProductBox@z); + \draw node[sw]{\copy\ProductBox@Top}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + rectangle (\ProductBox@x,\ProductBox@z); + \end{scope} + \begin{scope}[xshift=\ProductBox@z] + \clip + (0mm,0mm) -- (.5*\ProductBox@z,-.5*\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-.5*\ProductBox@z) -- + (\ProductBox@x,0mm) -- cycle; + \draw (\ProductBox@x,-\ProductBox@z) + node[se]{\copy\ProductBox@Bottom}; + \draw [thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (.5*\ProductBox@z,-.5*\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-.5*\ProductBox@z) -- + (\ProductBox@x,0mm) -- cycle; + \draw (.5*\ProductBox@x,-.75*\ProductBox@z) node[num]{3}; + \end{scope} + \begin{scope}[xshift=\ProductBox@x+2*\ProductBox@z] + \clip + (0mm,0mm) -- (0mm,-\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- + (.5*\ProductBox@z,-.5*\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-.5*\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-\ProductBox@z) -- + (\ProductBox@x,-\ProductBox@z) -- (\ProductBox@x,0mm) -- + cycle; + \draw node[se,rotate=180]{\copy\ProductBox@Bottom}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (0mm,-\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- + (.5*\ProductBox@z,-.5*\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-.5*\ProductBox@z) -- + (\ProductBox@x-.5*\ProductBox@z,-\ProductBox@z) -- + (\ProductBox@x,-\ProductBox@z) -- (\ProductBox@x,0mm) -- + cycle; + \draw (.25*\ProductBox@z,-.75*\ProductBox@z) node[num]{1}; + \draw (\ProductBox@x-.25*\ProductBox@z,-.75*\ProductBox@z) + node[num]{1}; + \end{scope} + \begin{scope}[xshift=\ProductBox@z+\ProductBox@x] + \clip + (0mm,0mm) -- (\ProductBox@z,0mm) -- + (.5*\ProductBox@z,-.5*\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- (0mm,-\ProductBox@z) -- + cycle; + \draw (\ProductBox@z,0mm) + node[se,rotate=90]{\copy\ProductBox@Bottom}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (\ProductBox@z,0mm) -- + (.5*\ProductBox@z,-.5*\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- (0mm,-\ProductBox@z) -- + cycle; + \draw (.25*\ProductBox@z,-.75*\ProductBox@z) node[num]{2}; + \end{scope} + \begin{scope} + \clip + (0mm,0mm) -- (\ProductBox@z,0mm) -- + (\ProductBox@z,-\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- + (.5*\ProductBox@z,-.5*\ProductBox@z) -- cycle; + \draw + node[sw,rotate=270]{\copy\ProductBox@Bottom}; + \draw [thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (\ProductBox@z,0mm) -- + (\ProductBox@z,-\ProductBox@z) -- + (.5*\ProductBox@z,-\ProductBox@z) -- + (.5*\ProductBox@z,-.5*\ProductBox@z) -- cycle; + \draw (.75*\ProductBox@z,-.75*\ProductBox@z) node[num]{2}; + \end{scope} + \begin{scope}[xshift=2*\ProductBox@x+2*\ProductBox@z] + \clip + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize/4) -- + (\ProductBox@earSize/2,\ProductBox@y-\ProductBox@earSize/4) -- + (0mm,\ProductBox@y) -- cycle; + \draw node[sw]{\copy\ProductBox@Left}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize/4) -- + (\ProductBox@earSize/2,\ProductBox@y-\ProductBox@earSize/4) -- + (0mm,\ProductBox@y) -- cycle; + \end{scope} + \begin{scope}[yshift=\ProductBox@y] + \clip + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z-\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z,0mm) -- cycle; + \draw node[nw,rotate=90]{\copy\ProductBox@Top}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z-\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z,0mm) -- cycle; + \end{scope} + \begin{scope}[xshift=\ProductBox@x+\ProductBox@z, + yshift=\ProductBox@y] + \clip + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z-\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z,0mm) -- cycle; + \draw node[se,rotate=270]{\copy\ProductBox@Top}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z-\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@z,0mm) -- cycle; + \end{scope} + \begin{scope}[xshift=\ProductBox@z, + yshift=\ProductBox@y+\ProductBox@z] + \clip + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@x-\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@x,0mm) -- cycle; + \draw (0mm,\ProductBox@y) + node[se,rotate=180]{\copy\ProductBox@Back}; + \draw[thin,opacity=\ProductBox@foldOpacity,\ProductBox@foldLine] + (0mm,0mm) -- (\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@x-\ProductBox@earSize/2,\ProductBox@earSize) -- + (\ProductBox@x,0mm) -- cycle; + \end{scope} + \end{tikzpicture}} +\newcommand\ProductBoxThreeDStartHook{} +\newcommand\ProductBoxThreeDEndHook{} +\newif\ifProductBox@shadow \ProductBox@shadowtrue +\newif\ifProductBox@mirror +\newif\ifProductBox@flare +\newcommand\ProductBox@edgeColor{white} +\newcommand\ProductBox@flareDiameter{24mm} +\newcommand\ProductBox@angleZ{8} +\newcommand\ProductBox@angleX{10} +\newcommand\ProductBox@style@threeD{ + \begin{tikzpicture}[sw/.style={anchor=south west, + inner sep=0pt}] + \ProductBoxThreeDStartHook + \ifProductBox@mirror \ProductBox@threeD@mirror \fi + \ifProductBox@shadow \ProductBox@threeD@shadow \fi + + \begin{scope} + \fill[white, + yslant=\ProductBox@p@front@yslant, + xscale=\ProductBox@p@front@xscale, + yscale=\ProductBox@p@front@yscale, + anchor=south west] + rectangle (\ProductBox@x,\ProductBox@y); + \draw + node[sw, + yslant=\ProductBox@p@front@yslant, + xscale=\ProductBox@p@front@xscale, + yscale=\ProductBox@p@front@yscale] + {\copy\ProductBox@Front}; + \fill[black, + fill opacity=.025, + yslant=\ProductBox@p@front@yslant, + xscale=\ProductBox@p@front@xscale, + yscale=\ProductBox@p@front@yscale, + anchor=south west] + rectangle (\ProductBox@x,\ProductBox@y); + \ifProductBox@flare + \begin{scope}[ + yslant=\ProductBox@p@front@yslant, + xscale=\ProductBox@p@front@xscale, + yscale=\ProductBox@p@front@yscale] + \clip rectangle(\ProductBox@x,\ProductBox@y); + \ProductBox@threeD@flare + \end{scope} + \fi + \end{scope} + \begin{scope}[shift={(-\ProductBox@p@left@xscale*\ProductBox@z, + \ProductBox@p@left@yslant + *\ProductBox@p@left@xscale + *\ProductBox@z)}] + \fill[white, + yslant=-\ProductBox@p@left@yslant, + xscale=\ProductBox@p@left@xscale, + yscale=\ProductBox@p@left@yscale, + anchor=south west] + rectangle (\ProductBox@z,\ProductBox@y); + \draw + node[sw, + yslant=-\ProductBox@p@left@yslant, + xscale=\ProductBox@p@left@xscale, + yscale=\ProductBox@p@left@yscale] + {\copy\ProductBox@Left}; + \fill[black, + fill opacity=.25, + yslant=-\ProductBox@p@left@yslant, + xscale=\ProductBox@p@left@xscale, + yscale=\ProductBox@p@left@yscale, + anchor=south west] + rectangle (\ProductBox@z,\ProductBox@y); + \end{scope} + \begin{scope}[yshift=\ProductBox@y] + \fill [white, + anchor=south west, + xslant=-\ProductBox@p@top@xslant, + xscale=\ProductBox@p@top@xscale, + yslant=\ProductBox@p@top@yslant, + yscale=\ProductBox@p@top@yscale] + rectangle (\ProductBox@x,\ProductBox@z); + \draw + node[sw, + xslant=-\ProductBox@p@top@xslant, + xscale=\ProductBox@p@top@xscale, + yslant=\ProductBox@p@top@yslant, + yscale=\ProductBox@p@top@yscale] + {\copy\ProductBox@Top}; + \fill [black, + fill opacity=.0025, + anchor=south west, + xslant=-\ProductBox@p@top@xslant, + xscale=\ProductBox@p@top@xscale, + yslant=\ProductBox@p@top@yslant, + yscale=\ProductBox@p@top@yscale] + rectangle (\ProductBox@x,\ProductBox@z); + \end{scope} + \begin{scope}[shift={(-\ProductBox@p@left@xscale*\ProductBox@z, + \ProductBox@p@left@yslant*\ProductBox@p@left@xscale*\ProductBox@z)}] + \draw [\ProductBox@edgeColor, + line width=.5mm, + draw opacity=.25, + yslant=-\ProductBox@p@left@yslant, + xscale=\ProductBox@p@left@xscale] + (\ProductBox@z,0mm) -- + (\ProductBox@z,\ProductBox@y) -- + (0mm,\ProductBox@y); + \end{scope} + \draw [\ProductBox@edgeColor, + line width=.5mm, + draw opacity=.25, + yslant=\ProductBox@p@front@yslant, + xscale=\ProductBox@p@front@xscale, + anchor=south west] + (0mm,\ProductBox@y) -- (\ProductBox@x,\ProductBox@y); + \ProductBoxThreeDEndHook + \end{tikzpicture}} +\newcommand\ProductBox@setFrontParams[3]{% + \def\ProductBox@p@front@yslant{#1}% + \def\ProductBox@p@front@xscale{#2}% + \def\ProductBox@p@front@yscale{#3}% +} +\newcommand\ProductBox@setLeftParams[3]{% + \def\ProductBox@p@left@yslant{#1}% + \def\ProductBox@p@left@xscale{#2}% + \def\ProductBox@p@left@yscale{#3}% +} +\newcommand\ProductBox@setTopParams[4]{% + \def\ProductBox@p@top@xslant{#1}% + \def\ProductBox@p@top@yslant{#2}% + \def\ProductBox@p@top@xscale{#3}% + \def\ProductBox@p@top@yscale{#4}% +} +\newcommand\ProductBox@setMirrorParams[1]{% + \def\ProductBox@p@mirror@yscale{#1}% +} +\@namedef{ProductBox@View@1}{% + \ProductBox@setFrontParams{.25}{.9090909}{1}% + \ProductBox@setLeftParams{.5}{.6666666}{1}% + \ProductBox@setTopParams{2}{.2265}{1.363}{.3333333}% + \ProductBox@setMirrorParams{.4}} +\@namedef{ProductBox@View@2}{% + \ProductBox@setFrontParams{.15}{.9090909}{1}% + \ProductBox@setLeftParams{.6666666}{.5}{1}% + \ProductBox@setTopParams{1.5}{.12}{1.11}{.333333}% + \ProductBox@setMirrorParams{.4}} +\@namedef{ProductBox@View@3}{% + \ProductBox@setFrontParams{.05}{.95}{1}% + \ProductBox@setLeftParams{.25}{.4}{1}% + \ProductBox@setTopParams{4}{.04}{1.133333}{.1}% + \ProductBox@setMirrorParams{.4}} +\@nameuse{ProductBox@View@1} +\newcommand\ProductBox@threeD@shadow{ + \begin{scope} + \foreach \x in {.5,1,1.5,2,2.5,3,4,5,6,8,10} { + \filldraw [black, + line width=\x mm, + rounded corners=2mm, + opacity=.01, + shift={(-1mm,1mm)}] + (0mm,0mm) -- + (-\ProductBox@p@top@xslant + *\ProductBox@p@left@xscale + *\ProductBox@z, + \ProductBox@p@top@yscale + *\ProductBox@z) -- + (0mm, + \ProductBox@p@top@yscale*\ProductBox@z + + \ProductBox@p@top@xslant + *\ProductBox@p@left@xscale + *\ProductBox@p@top@yslant + *\ProductBox@z) -- + cycle; + } + \end{scope} +} +\tikzfading[name=ProductBoxFade, + top color=transparent!100, + bottom color=transparent!50, + middle color=transparent!100] +\newcommand\ProductBox@threeD@mirror{% + \fill + node[anchor=south west, + inner sep=0pt, + yslant=\ProductBox@p@front@yslant, + xscale=\ProductBox@p@front@xscale, + yscale=-\ProductBox@p@mirror@yscale] + {\begin{tikzpicture} + \clip rectangle (\ProductBox@x, + \ProductBox@y*\ProductBox@p@mirror@yscale); + \fill node [scope fading=ProductBoxFade, + yscale=\ProductBox@p@mirror@yscale, + inner sep=0pt]{\copy\ProductBox@Front}; + \end{tikzpicture}}; + \fill[xshift=-\ProductBox@p@left@xscale*\ProductBox@z, + yshift=\ProductBox@p@top@yscale*\ProductBox@z] + node[anchor=south west, + inner sep=0pt, + yslant=-\ProductBox@p@left@yslant, + xscale=\ProductBox@p@left@xscale, + yscale=-\ProductBox@p@mirror@yscale] + {\begin{tikzpicture} + \clip rectangle (\ProductBox@z, + \ProductBox@y*\ProductBox@p@mirror@yscale); + \fill node [scope fading=ProductBoxFade, + yscale=\ProductBox@p@mirror@yscale, + inner sep=0pt]{\copy\ProductBox@Left}; + + \end{tikzpicture}}; +} +\newcommand\ProductBox@threeD@flare{ + \fill [white,path fading=ProductBoxFlare] + (.8*\ProductBox@x,.9*\ProductBox@y) + circle(\ProductBox@flareDiameter); +} +\tikzfading[name=ProductBoxFlare, + inner color=transparent!60, + outer color=transparent!100] +\@namedef{ProductBox@style@3D}{\ProductBox@style@threeD} +\@namedef{ProductBox@style@3d}{\ProductBox@style@threeD} +\endinput +%% +%% End of file `productbox.sty'. |