
경로 명령 내부에 그릴 tikz 레이어를 정의하는 것이 가능합니까 \node[on main layer] at (0,0) {foo};
? 범위 환경에 단일 매크로를 배치하는 것은 약간 지루합니다.
답변1
옵션 behind path
과 in front of path
동일한 명령으로 그려지는 노드와 선을 중첩할 수 있습니다.
\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[thick, draw=green] (0,0) --
node[pos=0.25, behind path, fill=red!30 ]{A}
node[pos=0.75, fill=red!30 ]{A} (2,0);
\path (1,1) node[fill=blue!20] {A}
node[fill=green, behind path, inner sep=3mm] {A}
node[fill=red, inner sep=1mm, in front of path] {};
\end{tikzpicture}
\end{document}