In
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (bottom left) at (10,10);
\coordinate (top right) at (20,20);
\draw[rounded corners,fill=black] (bottom left) rectangle (top right);
\end{tikzpicture}
\end{document}
the line
\draw[rounded corners,fill=black] (bottom left) rectangle (top right);
draws a black rectangle with rounded corners between the coordinates (bottom left) and (top right).
What's the most concise way to define a node with exactly the same shape, position and size as a rectangle defined with '\draw' and 'rectangle' (as above)?
The solution should ...
- use the provided coordinates with manual calculations,
- work with rounded corners,
- place the node's coordinates (n.north, n.west, ...) were expected, and
- be as concise (and elegant) as possible.
to path
.\begin{tikzpicture}[rotate=30]
. Should this transformation also apply to the rectangular node?