\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\draw[help lines] (-6,-6) grid (6,6);
\foreach \x in {0,36,72,...,324}
\draw [decorate,decoration={brace,amplitude=10pt},rotate=\x] (0.5,0.5) -- (0.5,5.0);
\end{tikzpicture}
\end{document}
You can also rotate around
a point.
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathreplacing}
\begin{document}
\begin{tikzpicture}
\draw[help lines] (-6,-6) grid (6,6);
\foreach \x in {0,36,72,...,324}
\draw [decorate,decoration={brace,amplitude=10pt},rotate around={\x:(0.5,0.5)},=\x] (0.5,0.5) -- (0.5,5.0);
\end{tikzpicture}
\end{document}
You can apply a convenient shift to the coordinates used for the brace:
\documentclass[]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{fit,calc,positioning,decorations.pathreplacing,matrix}
\begin{document}
\begin{tikzpicture}[decoration={brace}][scale=2]
\node [draw] (A) {A};
\node [fit=(A)] (fit) {};
\draw [decorate,line width=1pt]
([yshift=-5pt]fit.south west) -- ([yshift=5pt]fit.north west);
\end{tikzpicture}
\end{document}
Your settings for scale=2
won't have any effect since you are using a second optional argument which is not a correct syntax; tikzpicture
only admits one optional argument:
\begin{tikzpicture}[<options>]
...
\end{tikzpicture}
where <options>
is a comma separated list of options.
It is not clear to me why are you using the fit
node; you can use something like this, without this node:
\documentclass[]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{fit,calc,positioning,decorations.pathreplacing,matrix}
\begin{document}
\begin{tikzpicture}
\node [draw] (A) {A};
\draw[decoration={brace,raise=5pt},decorate,line width=1pt]
([yshift=-5pt]A.south west) -- ([yshift=5pt]A.north west);
\end{tikzpicture}
\end{document}
Also, notice that the option scale=2
is not having effect (you would need to add transform shape
).
Best Answer
You can define a style and use the
aspect
key (which determines the fraction of the total length where the "middle part" of the brace will be) for thebrace
decoration: