tikz ノード間の不要なスペース

tikz ノード間の不要なスペース

次の MWE は問題を示しています。接続された塗りつぶし領域の間には小さな隙間があり、そこに背景が表示されます (赤いマークが付いた拡大画像を参照)。

\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\pagecolor{green}
\begin{tikzpicture}[node distance=1mm and 6mm]
  \node (b1) [text width=10mm, text height=10mm,fill=white]{};
  \node (b2) [text width=10mm, text height=10mm,fill=black,right=of b1]{};
  \fill[black] (b1.north east) -- (b2.north west) -- (b2.south west) -- (b1.south east) -- cycle; 
\end{tikzpicture}
\end{document}

塗りつぶされた領域の間に背景画像が表示されないようにするにはどうすればよいですか?

ここに画像の説明を入力してください

答え1

outer sepゼロに等しくする必要があります。

\documentclass{scrartcl}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\pagecolor{green}
\begin{tikzpicture}[node distance=1mm and 6mm]
  \node (b1) [text width=10mm, text height=10mm,fill=white,outer sep=0pt]{};
  \node (b2) [text width=10mm, text height=10mm,fill=black,right=of b1,outer sep=0pt]{};
  \fill[black] (b1.north east) -- (b2.north west) -- (b2.south west) -- (b1.south east) -- cycle;
\end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

関連情報