5

I'm trying to create a custom shape surrounding some nodes. I have used a \path to draw the shape but I don't get a rounded corner where I begin drawing the shape. Here's my MWE:

\begin{tikzpicture}

\path [rounded corners=10pt, draw] (0,0) -- 
      ++(50em, 0) --
      ++(0em,-20.5em) -- ++(-24em, 0em) -- 
      ++(0, 11.25em) -- ++(-26em, 0) --
      (0,0)
      {}; 

\end{tikzpicture}

The output looks like this:

enter image description here

How do I get rid of the harsh corner at top-left?

1 Answer 1

8

The start and end points are not connected, therefore the rounded corners is not applied to them. They can be connected by cycle:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}

\path [rounded corners=10pt, draw] (0,0) --
      ++(50em, 0) --
      ++(0em,-20.5em) -- ++(-24em, 0em) --
      ++(0, 11.25em) -- ++(-26em, 0) --
      cycle
      {};

\end{tikzpicture}

\end{document}

Result

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .