diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-lens/pst-lens.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-lens/pst-lens.tex | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-lens/pst-lens.tex b/Master/texmf-dist/tex/generic/pst-lens/pst-lens.tex new file mode 100644 index 00000000000..528665a07c0 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pst-lens/pst-lens.tex @@ -0,0 +1,113 @@ +%% +%% This is file `pst-lens.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pst-lens.dtx (with options: `pst-lens') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from pst-lens.tex. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file pst-lens.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.) +%% +%% Package `pst-lens.dtx' +%% +%% Denis Girou (CNRS/IDRIS - France) <Denis.Girou@idris.fr> +%% Manuel Luque <Mluque5130@aol.com> (ml) +%% Herbert Voss <voss@pstricks.de> (hv) +%% +%% September 03, 2005 +%% +%% This file is under the LaTeX Project Public License +%% See CTAN archives in directory macros/latex/base/lppl.txt. +%% +%% DESCRIPTION: +%% `pst-lens' is a PSTricks package to define a generic lens, which can be +%% used on texts and graphics. +%% +\csname PSTLensLoaded\endcsname +\let\PSTLensLoaded\endinput +\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi +\ifx\GradientLoaded\endinput\else\input pst-grad.tex\fi +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % (hv 2005-09-03) +\edef\PstAtCode{\the\catcode`\@} +\catcode`\@=11\relax +\pst@addfams{pst-lens} +\def\fileversion{1.01} +\def\filedate{2005/09/03} +\message{`PST-Lens' v\fileversion, \filedate\space + (Denis Girou and Manuel Luque)} +\newif\ifPstLens@Handle +\define@key[psset]{pst-lens}{LensHandle}[true]{% + \@nameuse{PstLens@Handle#1}} +\define@key[psset]{pst-lens}{LensStyleHandle}{% + \def\PstLens@StyleHandle{#1}} +\newdimen\PstLens@HandleWidth +\define@key[psset]{pst-lens}{LensHandleWidth}{% + \pssetlength{\PstLens@HandleWidth}{#1}} +\define@key[psset]{pst-lens}{LensHandleHeight}{% + \def\PstLens@HandleHeight{#1}} +\newif\ifPstLens@Shadow +\define@key[psset]{pst-lens}{LensShadow}[true]{% + \@nameuse{PstLens@Shadow#1}} +\define@key[psset]{pst-lens}{LensStyleGlass}{% + \def\PstLens@StyleGlass{#1}} +\define@key[psset]{pst-lens}{LensSize}{% + \def\PstLens@Size{#1}} +\define@key[psset]{pst-lens}{LensMagnification}{% + \def\PstLens@Magnification{#1}} +\define@key[psset]{pst-lens}{LensRotation}{% + \def\PstLens@Rotation{#1}} +\psset[pst-lens]{% + LensHandle=true,LensHandleWidth=0.2,LensHandleHeight=2.5, + LensStyleHandle=LensStyleHandle, + LensShadow=true,LensStyleGlass=LensStyleGlass, + LensRotation=0,LensSize=1,LensMagnification=1} +\newcmykcolor{Brown}{0 0.81 1 0.6} +\newcmykcolor{Salmon}{0 0.53 0.38 0} +\newpsstyle{LensStyleHandle}{% + fillstyle=gradient,framearc=0.6,linewidth=0.5\pslinewidth, + gradmidpoint=0.5,gradangle=\PstLens@Rotation,gradbegin=Brown,gradend=Salmon} +\newpsstyle{LensStyleGlass}{% + fillstyle=solid,fillcolor=white, + shadow=true,shadowcolor=lightgray,shadowsize=0.15, + shadowangle=\PstLens@Rotation} +\def\PstLensShape{\pscircle{1}} +\def\PstLens{\@ifnextchar[{\PstLens@i}{\PstLens@i[]}} +\def\PstLens@i[#1]{\@ifnextchar({\PstLens@ii[#1]}{\PstLens@ii[#1](0,0)}} +\def\PstLens@ii[#1](#2,#3)#4{{% +\psset{#1}% +\SpecialCoor +\rput{\PstLens@Rotation}(#2,#3){% + \ifPstLens@Handle + \scalebox{\PstLens@Size}{% + \divide\PstLens@HandleWidth\tw@ + \psframe[style=\PstLens@StyleHandle] + (-\PstLens@HandleWidth,0) + (\PstLens@HandleWidth,-\PstLens@HandleHeight)}% + \fi} +\psclip{{\psset{style=\PstLens@StyleGlass} + \ifPstLens@Shadow + \else + \psset{shadow=false} + \fi + \rput(#2,#3){\psset{unit=\PstLens@Size}\PstLensShape}}} + \rput(! 1 \PstLens@Magnification\space sub #2\space mul + 1 \PstLens@Magnification\space sub #3\space mul){% + \scalebox{\PstLens@Magnification}{#4}} +\endpsclip}} +\catcode`\@=\PstAtCode\relax +\endinput +%% +%% End of file `pst-lens.tex'. |