diff --git a/wahlergebnis.tex b/wahlergebnis.tex index 792f046d406a7d6600fcdcab305ee23765e6f98e..d1843951b971be86ce9c4de8826f40cefddfb050 100644 --- a/wahlergebnis.tex +++ b/wahlergebnis.tex @@ -18,6 +18,7 @@ \usetikzlibrary{arrows} \usetikzlibrary{shadows} \usetikzlibrary{calc} % für ($ ... $) +\usetikzlibrary{patterns} \pagestyle{empty} @@ -44,13 +45,14 @@ \newcommand{\piechart}[1]{ \begin{tikzpicture}[segment/.style={ rounded corners=.2cm, - draw = boxbg, line width=.1cm, }, + baseline = (B.center), ] \pgfmathsetmacro{\curarc}{180} % starting angle \pgfmathsetmacro{\radius}{5.4} \useasboundingbox (-\radius cm,+\radius cm) rectangle (+\radius cm,0); + \coordinate (B) at (0,0); \pgfmathsetmacro{\smallradius}{1.26} \foreach \percent/\seats/\name/\curcolor [remember=\curarc] in { #1} @@ -68,20 +70,31 @@ ? (\labelarc - 180) : \labelarc} \pgfmathsetmacro{\middle}{0.5*\startarc+0.5*\endarc} - \def\mypath{(\startarc:\smallradius cm) + \edef\mypath{(\startarc:\smallradius cm) arc (\startarc:\endarc:\smallradius cm) -- (\endarc:\radius cm) arc (\endarc:\startarc:\radius cm) -- cycle} - % \node { - %\begin{tikzfadingfrompicture}[name=fade right,scale=0.5] - %\fill[fill=transparent] (-\radius cm,+\radius cm) rectangle (+\radius cm,0); - %\draw[fill=white] \mypath; - %\draw[segment,draw=black,line width = 2mm] \mypath; + %\node { + %\begin{minipage}{\linewidth} + %\begin{tikzfadingfrompicture}[name=myfad, rounded corners = 0] + %\useasboundingbox (-\radius cm,+\radius cm) rectangle (+\radius cm,0); + %\fill[black, + % ] (-\radius cm,0) -| (\radius cm,\radius cm) -| cycle; + %\draw[fill=transparent,draw=transparent] (-\radius cm,\radius cm) rectangle (\radius cm,0); + %\draw[segment,fill=white,draw=transparent] \mypath; + %%\fill[red] \mypath; %\end{tikzfadingfrompicture} + %\end{minipage} %}; - %\fill[path fading=fade right,fill=\curcolor] (-\radius cm,+\radius cm) rectangle (+\radius cm,0); - \draw[segment,fill=\curcolor] \mypath; + %\draw[path fading = myfad, + % rounded corners= 0, + % fit fading=true, + % %fading transform={yshift=-0.5*\radius cm}, + % fill=\curcolor, + % draw=none, + % ] (-\radius cm,0) -| (\radius cm,\radius cm) -| cycle; + \draw[segment,fill=\curcolor,draw=boxbg] \mypath; \node [anchor=center,rotate=\labelarc, shape border rotate=0] at (\middle:0.5*\radius+0.5*\smallradius) {\sf{\color{percentcolor} @@ -187,9 +200,13 @@ \NewEnviron{twbox}[1]{% \begin{tikzpicture}[remember picture]% -\draw node[draw=stuverot,fill=boxbg,% +\draw node[draw=stuverot, + fill=boxbg,% + %top color = boxbg!90!black, + %bottom color = boxbg!90!white, very thick,rounded corners,% inner sep=1ex, + %pattern = checkerboard, ]% (lasttwbox) {%