[pstricks] selective anti-aliasing? (FYI Colours with multido)

Carsten Vogel texnicer at web.de
Tue May 10 13:35:20 CEST 2011


Am 10.05.2011 10:18, schrieb Christoph Bersch:
>>> Although I am already quite happy with this I like to take
>>> programming/style advises.
> Here is a suggestion for using only single multido variables and some
> other tunings, I hope I did not overoptimize ;-)

I was just about to post my code but then I saw yours and thought.... 
erm... well,... erm... thanks. I'll study it.

Carsten

%-----------------------------------------------------
>
> \documentclass{scrartcl}
> \usepackage[T1]{fontenc}
> \usepackage[utf8]{inputenc}
> \usepackage{multido}
> \usepackage[]{libertine}
> \usepackage[]{pstricks}
> \usepackage{ifthen}
> \usepackage[margin=10mm, left=15mm, right=5mm, nohead, nofoot]{geometry}
> \setlength{\parindent}{0pt}
> \newcommand{\SetCurrentColor}[4]{%
> \definecolor[ps]{current}{cmyk}{%
> #1 100 div #2 100 div #3 100 div #4 100 div}%
> }
> \newpsstyle{colorfill}{fillstyle=solid, linewidth=0.5pt,
> linecolor=white, dimen=outer, fillcolor=current}
> \SpecialCoor
> \begin{document}\pagestyle{empty}
> \multido{\nMagenta=0+10}{11}{%
> \multido{\nBlack=0+10}{10}{%
> {\Large Table Magenta-\nMagenta-\nBlack}\\%
> \begin{pspicture}(-1,1)(17.85, -17.85)
> \psframe(-1,1)(17.85,-17.85)%
> \rput[t](8.925, .9 ){Yellow in \%}
> \rput[l](-0.9, -8.925 ){\rput[t]{90}{Cyan in \%}}
> \multido{\nYellow=0+5}{21}{%
> \rput[b](!\nYellow\space 0.17 mul 0.425 add .2){\nYellow}
> \multido{\nCyan=0+5}{21}{ %
> \ifnum\nYellow=0
> \rput[r](! -0.03 \nCyan\space -0.17 mul 0.425 sub){\nCyan}
> \fi
> \SetCurrentColor{\nCyan}{\nMagenta}{\nYellow}{\nBlack}%
> \rput(!\nYellow\space 0.17 mul \nCyan\space -0.17 mul){%
> \psframe[style=colorfill](0.85, -0.85)
> }%
> }% multido
> }% multido
> \end{pspicture} \newpage%
> }% multido
> }% multido
> \end{document}



More information about the PSTricks mailing list