Debian Codegraph @

texmf-dist/tex/latex/harveyballs/harveyballs.sty

raw
1 %% Harvey Balls for LaTeX
2 %% Copyright (C) 2013 Sascha Roth, Technical University Munich
3 %%
4 %% This program is free software: you can redistribute it and/or modify
5 %% it under the terms of the GNU General Public License as published by
6 %% the Free Software Foundation, either version 3 of the License, or
7 %% (at your option) any later version.
8 %%
9 %% This program is distributed in the hope that it will be useful,
10 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
11 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 %% GNU General Public License for more details.
13 %%
14 %% You should have received a copy of the GNU General Public License
15 %% along with this program. If not, see <http://www.gnu.org/licenses/>.
16 %%
17
18
19 \NeedsTeXFormat{LaTeX2e}[2001/06/01]
20 \ProvidesPackage{harveyballs}[2013/10/22 Harvey Balls for LaTeX by Sascha Roth, Technical University Munich, [email protected]]
21 \RequirePackage{tikz}
22 %user variables
23 \def\harveyBallsSize{0.85ex}%size of the harvey balls
24 \def\harveyBallsLineWidth{0.2pt}%line width of the harvey balls
25 \def\harveyBallsColor{black}
26 \def\harveyBallsLineColor{black}
27
28 %
29 \DeclareRobustCommand{\harveyBallNone}[1][\harveyBallsSize]{%
30 \begin{tikzpicture}%
31 \draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth] (0,0) circle (#1);%
32 \end{tikzpicture}%
33 }%
34 \DeclareRobustCommand{\harveyBallQuarter}[1][\harveyBallsSize]{%
35 \begin{tikzpicture}%
36 \draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth](0,0) circle (#1);%
37 \fill[fill=\harveyBallsColor] (0,0) -- (#1,0mm) arc (0:90:#1) -- cycle;%
38 \end{tikzpicture}%
39 }%
40 \DeclareRobustCommand{\harveyBallHalf}[1][\harveyBallsSize]{%
41 \begin{tikzpicture}%
42 \draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth](0,0) circle (#1);%
43 \fill [fill=\harveyBallsColor] (0,0) -- (0mm,#1) arc (90:-90:#1) -- cycle;%
44 \end{tikzpicture}%
45 }%
46 \DeclareRobustCommand{\harveyBallThreeQuarter}[1][\harveyBallsSize]{%
47 \begin{tikzpicture}%
48 \draw[draw=\harveyBallsLineColor,line width=\harveyBallsLineWidth](0,0) circle (#1);%
49 \fill [fill=\harveyBallsColor] (0,0) -- (0mm,#1) arc (90:-180:#1) -- cycle;%
50 \end{tikzpicture}%
51 }%
52 \DeclareRobustCommand{\harveyBallFull}[1][\harveyBallsSize]{%
53 \begin{tikzpicture}%
54 \filldraw[draw=\harveyBallsLineColor,fill=\harveyBallsColor,line width=\harveyBallsLineWidth] (0,0) circle (#1);%
55 \end{tikzpicture}%
56 }%