
答え1
これを行う簡単な方法は を使用することです。追加の魔法を使用すると、 が画像の左下隅、が画像の右上隅になるpath picture
ようにパス画像を設定できます。これにより、パス画像の要素を指定するのが非常に簡単になります。(-1,-1)
(1,1)
\documentclass[tikz,border=5]{standalone}
\tikzset{%
do path picture/.style={%
path picture={%
\pgfpointdiff{\pgfpointanchor{path picture bounding box}{south west}}%
{\pgfpointanchor{path picture bounding box}{north east}}%
\pgfgetlastxy\x\y%
\tikzset{x=\x/2,y=\y/2}%
#1
}
},
sin wave/.style={do path picture={
\draw [line cap=round] (-3/4,0)
sin (-3/8,1/2) cos (0,0) sin (3/8,-1/2) cos (3/4,0);
}},
cross/.style={do path picture={
\draw [line cap=round] (-1,-1) -- (1,1) (-1,1) -- (1,-1);
}},
plus/.style={do path picture={
\draw [line cap=round] (-3/4,0) -- (3/4,0) (0,-3/4) -- (0,3/4);
}}
}
\begin{document}
\begin{tikzpicture}[minimum size=0.75cm]
\node [circle, draw, sin wave] at (-1, 0) {};
\node [circle, draw, plus] at ( 0, 0) {};
\node [circle, draw, cross] at ( 1, 0) {};
\end{tikzpicture}
\end{document}