9

Can someone please explain me why the following code doesn't result in a fill?

And why, sometimes, I get such "very thin lines" artifact (that's visibile in my picture)?

\begin{tikzpicture}
\node (A) at (0,0) {A};
\node (B) at (1,0) {B};
\node (C) at (1,1) {C};
\fill[red] (A) -- (B) -- (C) --cycle;
\end{tikzpicture}

Here's what I get:

7

As pointed here, nodes have a shape and are not just pure coordinate. Your example works if you replace the fill line by real node coordinates:

\fill[red] (A.center) -- (B.center) -- (C.center) -- cycle; 

result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.