Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 8 down vote accepted

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

share|improve this answer
    
Ah, got it. Thanks a bunch. –  recluze Nov 10 '12 at 12:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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