Part of the radialshading should be cut out of it. With this \clip(?)ed
part I want to fill the \predefined
node shape (here: \node
maerz). Sorry for my english.
The \shade
works for two colors (here: violet black) but for me not manageable. Contrary at first the use of \pgfdeclareradialshading
in pgfman301a, p.1082. But I cannot replace the \shade[inner colo and so on]
before the "let" with \pgfuseshading{sphere}
. Yes, both are different constructs, therefore syntax invalid. But I have the feeling the wished result lies before my eyes but i cannot work it out.
Is there anyone who could help?
Of course the radialshading must be extended to the wanted radius (s.code: pgf declaration of radial shading). The point is: cut out, fill with the outcutted shade the \node
maerz from sector center to arc center.
\documentclass[margin=100pt]{standalone}
\usepackage{tikz}
\makeatletter
% from https://tex.stackexchange.com/a/127045/121799
\tikzset{use path/.code=\tikz@addmode{\pgfsyssoftpath@setcurrentpath#1}}
\makeatother
\usetikzlibrary{calc,shapes.geometric,backgrounds,fadings}
\tikzfading[name=fade in,inner color=transparent!10,outer color=transparent!10]
\pgfdeclareradialshading[fradialcolour1,fradialcolour2,fradialcolour3]
{fncyradial}{\pgfpoint{0}{0}}
{% manual 1082-1083;
%later - shading is assumed to be 100bp diameter ??
color(0)=(fradialcolour1);
color(20bp)=(fradialcolour2);
color(40bp)=(fradialcolour3);
color(50bp)=(fradialcolour3)
}
\tikzset{% https://tex.stackexchange.com/a/372682/121799
fradial/.code={%
\tikzset{%
fancy radial/.cd,
shading=fncyradial,
#1
}
},%end fradial/.co...
fancy radial/.search also={/tikz},
fancy radial/.cd,
%
fancy radial inner colour/.code={\colorlet{fradialcolour1}{#1}},
fancy radial mid colour/.code={\colorlet{fradialcolour2}{#1}},
fancy radial outer colour/.code={\colorlet{fradialcolour3}{#1}},
%
fancy radial inner colour=black,
fancy radial outer colour=red,
fancy radial mid colour=violet,
inner color/.style={
fancy radial inner colour=#1,
},
outer color/.style={
fancy radial outer colour=#1,
},
mid color/.style={
fancy radial mid colour=#1,
},
}%end tikzset
\begin{document}
\begin{tikzpicture}[scale=1.0,transform shape]
\tikzset{shape circlesec/.style={
draw,
line width=0.1pt,
inner xsep=0pt,
inner ysep=0pt,
}
}%end tikzset
\node [name=maerz,
save path=\pathA,
shape=circular sector,
style=shape circlesec,
inner sep=0cm,
circular sector angle=30,
shape border uses incircle,
shape border rotate=-165,
anchor=sector center,inner sep=-2mm,%
minimum size = 6.6cm,%has an effect if the original size was smaller
]
(maerz) at (0,0) {};
\pgfdeclareradialshading{sphere}%shading name
{\pgfpoint{0}{0}}%center point pgfman301a,p.1083
{rgb(0.00cm)=(1.00,0.00,0.00); %color specification
rgb(1.70cm)=(0.60,1.00,0.00);
rgb(2.50cm)=(0.30,1.60,1.00);
rgb(3.00cm)=(0.00,0.30,1.50) %extent of the circle
}
\begin{scope}[on background layer]
\pgfuseshading{sphere};
% HOW integrate the \node name=maerz here instaed of shade???
% changing the \shade [option] with \pfgdeclareradialshading{sphere} doesn't work
\clip[use path=\pathA];
\shade[inner color=black,% third color not usable?
outer color=violet,
%mid color=green,%not usable?
path fading=fade in
] %the lengths here i want use for the \node nmae=maerz
let \p1=($(maerz.arc center)-(maerz.sector center)$),
\n1={veclen(\y1,\x1)}
in (maerz.sector center) circle (\n1);
\end{scope}
\foreach \anchor/\placement in
{arc center/right, sector center/below left}
\draw[shift=(maerz.\anchor)] plot[mark=x] coordinates{(0,0)}
node[\placement] {\scriptsize\texttt{(maerz.\anchor)}};
\draw let \p1=($(maerz.north)-(maerz.sector center)$),\n1={int(1+\y1*1pt/1cm)}%
in
\pgfextra{\pgfmathtruncatemacro{\xmax}{\n1}
\pgfmathtruncatemacro{\nextx}{\xmax-1}
}%end pgfextra code
foreach \x in {-\xmax,-\nextx,...,\xmax}
{(\x,1pt) -- (\x,-1pt) node[anchor=north,font=\tiny]{ $\x$} }
foreach \y in {-\xmax,-\nextx,...,\xmax}
{(1pt,\y) -- (-1pt,\y) node[anchor=east,font=\tiny]{($\y$)}};
\end{tikzpicture}
\end{document}