diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:51:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:51:53 +0000 |
commit | c11a98e10de0410a50337e5ab4e3b63b210eec13 (patch) | |
tree | 690b00bd75ff04ce9740a64e6ab1aeaed65a3836 /Master/texmf-dist/tex/latex/bardiag/bardiag.cfg | |
parent | 27ac78b71207f7568bad5b936aa5b3109e5eea82 (diff) |
bardiag
git-svn-id: svn://tug.org/texlive/trunk@692 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bardiag/bardiag.cfg')
-rw-r--r-- | Master/texmf-dist/tex/latex/bardiag/bardiag.cfg | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bardiag/bardiag.cfg b/Master/texmf-dist/tex/latex/bardiag/bardiag.cfg new file mode 100644 index 00000000000..b5910c14424 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bardiag/bardiag.cfg @@ -0,0 +1,126 @@ +% New colors defined +\definecolor{brown}{rgb}{.65, .16, .16} + +\definecolor{lightblue}{rgb}{.68, .85, .9} +\definecolor{lightred}{rgb}{1.0, .65, .65} + +\definecolor{darkyellow}{rgb}{0.6, 0.6, 0.3} + +\definecolor{palegreen}{rgb}{.6, .98, .6} +\definecolor{pink}{rgb}{1, .75, .8} +\definecolor{wheat}{rgb}{.96, .87, .7} +\definecolor{verylightgray}{gray}{0.95} + + +\newcommand{\arrowheight}{\dbar} +\newcommand{\arrowwidth}{\dbar} + +\newcommand{\ARbot}{0} +\newcommand{\RECTmid}{0} +\newcommand{\RECTwidth}{0.7} % 70% from \dbar +\newcommand{\RECTleft}{0} +\newcommand{\RECTright}{0} + +\newcommand{\mytempx}{0} +\newcommand{\mytempxx}{0} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Additional bar primitives % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\barArrowRect}[6][fillstyle=solid] +{\ifthenelse{\bdorientation = \bdvert} + {\FPfadd{\mytempx}{#2}{#4} + \FPdiv{\RECTmid}{\mytempx}{2} + + \FPfsub{\ARbot}{#5}{\arrowheight} + + \FPmul{\mytempx}{\dbar}{\RECTwidth} + \FPdiv{\mytempxx}{\mytempx}{2} + \FPfsub{\RECTleft}{\RECTmid}{\mytempxx} + \FPfadd{\RECTright}{\RECTmid}{\mytempxx} + + \psframe[linestyle=none,fillcolor=#6,linecolor=#6,#1](\RECTleft,#3)(\RECTright,\ARbot) + \pspolygon[fillcolor=#6,linecolor=#6,#1](#2,\ARbot)(\RECTmid,#5)(#4,\ARbot)(#2,\ARbot) + } + {\FPfadd{\mytempx}{#3}{#5} + \FPdiv{\RECTmid}{\mytempx}{2} + \FPfsub{\ARbot}{#4}{\arrowheight} + \FPmul{\mytempx}{\dbar}{\RECTwidth} + \FPdiv{\mytempxx}{\mytempx}{2} + \FPfsub{\RECTleft}{\RECTmid}{\mytempxx} + \FPfadd{\RECTright}{\RECTmid}{\mytempxx} + \psframe[linestyle=none,fillcolor=#6,linecolor=#6,#1](#2,\RECTleft)(\ARbot,\RECTright) + \pspolygon[fillcolor=#6,linecolor=#6,#1](\ARbot,#3)(#4,\RECTmid)(\ARbot,#5)(\ARbot,#3) + } +} +%--------------------------------------- +\newcommand{\barGradRect}[6][fillstyle=gradient] +{\ifthenelse{\bdorientation = \bdvert} + {\psframe[gradbegin=#6,gradend=white,gradmidpoint=1,gradangle=45, + fillstyle=gradient,linestyle=none,linecolor=#6](#2,#3)(#4,#5) + } + {\psframe[gradbegin=#6,gradend=white,gradmidpoint=1,gradangle=-45, + fillstyle=gradient,linestyle=none,linecolor=#6](#2,#3)(#4,#5) + } +} + +\newcommand{\barGradMidRect}[6][fillstyle=gradient] +{\ifthenelse{\bdorientation = \bdvert} + {\psframe[gradbegin=#6,gradend=white,gradmidpoint=0.3,gradangle=90, + fillstyle=gradient,linestyle=none,linecolor=#6](#2,#3)(#4,#5) + } + {\psframe[gradbegin=#6,gradend=white,gradmidpoint=0.3,gradangle=0, + fillstyle=gradient,linestyle=none,linecolor=#6](#2,#3)(#4,#5) + } +} +%--------------------------------------- +\newcommand{\barGradCylinder}[6][fillstyle=gradient] +{ \FPmul{\xtd}{\dbar}{\tdx} + \FPmul{\ytd}{\dbar}{\tdy} + + \FPdiv{\elRx}{\dbar}{2} + \FPdiv{\elRy}{\ytd}{2} + + \ifthenelse{\bdorientation = \bdvert} + { + \FPfadd{\tmpvar}{#2}{#4} + \FPdiv{\xtda}{\tmpvar}{2} % Xcenter of the bottom ellipse + \FPdiv{\tmpvar}{\ytd}{2} + \FPfadd{\ytda}{\tmpvar}{#3} % Ycenter of the bottom ellipse + \newpsstyle{gradcylstyle}{gradbegin=#6,gradend=white,gradmidpoint=0.25,gradangle=90,fillstyle=gradient,linestyle=none,linecolor=#6} + % Draw the bottom ellipse + \psellipse[style=gradcylstyle](\xtda,\ytda)(\elRx,\elRy) + \FPdiv{\tmpvar}{\ytd}{2} + \FPfadd{\ytdb}{\tmpvar}{#5} % Ycenter of the top ellipse + % Draw the rectangle + \psframe[style=gradcylstyle](#2,\ytda)(#4,\ytdb) + % Draw the top ellipse + \psellipse[fillstyle=solid,fillcolor=#6,linecolor=#6](\xtda,\ytdb)(\elRx,\elRy) + } + { \FPfadd{\tmpvar}{#3}{#5} + \FPdiv{\ytda}{\tmpvar}{2} + \FPdiv{\tmpvar}{\ytd}{2} + \FPfadd{\xtda}{\tmpvar}{#2} + \newpsstyle{gradcylstyle}{gradbegin=#6,gradend=white,gradmidpoint=0.25,gradangle=0,fillstyle=gradient,linestyle=none,linecolor=#6} + % Draw the left ellipse + \psellipse[style=gradcylstyle](\xtda,\ytda,)(\elRy,\elRx) + \FPdiv{\tmpvar}{\ytd}{2} + \FPfadd{\ytdb}{\tmpvar}{#4} + % Draw the rectangle + \psframe[style=gradcylstyle](\xtda,#3)(\ytdb,#5) + % Draw the right ellipse + \psellipse[fillstyle=solid,fillcolor=#6,linecolor=#6](\ytdb,\ytda)(\elRy,\elRx) + } +} +%--------------------------------------- +\newcommand{\barCoil}[6][qq] +{\ifthenelse{\bdorientation = \bdvert} + {\FPfadd{\mytempx}{#2}{#4} + \FPdiv{\RECTmid}{\mytempx}{2} + \pscoil[linecolor=#6,linewidth=3pt]{->}(\RECTmid,#3)(\RECTmid,#5) + } + {\FPfadd{\mytempx}{#3}{#5} + \FPdiv{\RECTmid}{\mytempx}{2} + \pscoil[linecolor=#5,linewidth=3pt]{->}(#2,\RECTmid)(#4,\RECTmid) + } +} |