summaryrefslogtreecommitdiff
path: root/info/examples/PSTricks_7_de/35-00-86.ltx
blob: 0afd4be6ce3a63b084a2020fafdbc86cd60497db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%% 
%%  Ein Beispiel der DANTE-Edition
%%  
%%  7. Auflage
%% 
%%  Beispiel 35-00-86 auf Seite 852.
%% 
%%  Copyright (C) 2016 Herbert Voss
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 
%% 
%% ==== 
% Show page(s) 1
%% 
%% 
\documentclass[]{exaarticle}
\pagestyle{empty}
\setlength\textwidth{352.81416pt}
\setlength\parindent{0pt}
%StartShownPreambleCommands
\usepackage{pstricks,multido}
\def\rateColor{black!40}
\newcommand\rating[2][]{%
  \ifx\relax#1\relax\else\gdef\rateColor{#1}\fi
  \psset{unit=1ex}%
  \pspicture[dimen=inner](-1.2,-1.2)(1.2,1.2)
    \psclip{\pscircle[linestyle=none]{1}}
      \psframe*[linecolor=\rateColor](-1,-1)(!1 #2 100 div 2 mul 1 sub)
    \endpsclip\pscircle[linewidth=0.1]{1}
  \endpspicture}
%StopShownPreambleCommands
\begin{document}
\tiny
\multido{\iA=0+10}{21}{\ifnum\iA>100\expandafter\rating\expandafter{\the\numexpr200-\iA}\else\rating{\iA}\fi} \par
\normalsize
\rating[red]{0}
\multido{\iA=10+10}{20}{\ifnum\iA>100\expandafter\rating\expandafter{\the\numexpr200-\iA}\else\rating{\iA}\fi} \par
\Large
\rating[blue]{0}
\multido{\iA=10+10}{20}{\ifnum\iA>100\expandafter\rating\expandafter{\the\numexpr200-\iA}\else\rating{\iA}\fi} \par
\end{document}