Below is an example using the fit
library to put a highlight around nodes A, B, and C. What if I wanted to exclude D? (obviously it would have to be a non-rectangular shape)
I guess I'm looking for a way to have union/intersection/difference of shapes.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows,arrows,positioning,fit,backgrounds,shapes,patterns}
\begin{document}
\begin{tikzpicture}[node distance=5mm, auto,
block/.style={
% The shape:
rectangle, minimum size=6mm, minimum height=6mm, minimum width=30mm,
rounded corners=1mm,
node distance=8mm,
% The rest
thick,draw=black,
top color=white,
bottom color=myblue!15,
font=\sffamily\footnotesize,
drop shadow
},
area/.style={
rectangle,
fill=green!80!black, opacity=0.2,
draw=black
},
>=latex
]
\node (a) {A};
\node [right=of a] (b) {B};
\node [below=of a] (c) {C};
\node [right =of c] (d) {D};
\node [area, fit=(a) (b) (c)] {};
\end{tikzpicture}
\end{document}
This is similar to How to perform not rectangular fit with tikz? but not the same.