Skip to content
Snippets Groups Projects
Commit ae00aacc authored by Thorsten Wißmann's avatar Thorsten Wißmann :guitar:
Browse files

Failed attempt to make the circle's border transparent

parent e639dc93
No related branches found
No related tags found
No related merge requests found
......@@ -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)
{%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment