How to decorate a node with additional paths?

I want to add styles to my nodes that draw additional paths inside of the node.

For example (without proper placement of nodes)

\node[draw,circle,lVert] {};
\node[draw,circle,lHor]  {};
\node[draw,circle,lVert,lHor] {};


shall result in these nodes:

Keywords

strike through node, line in node, strike through style, cross, path as style

-
Seems similar to Creating a seamless XOR symbol as node. –  Claudio Fiandrino Feb 13 '14 at 15:10
@ClaudioFiandrino There is a solution to my problem slumbering in the accepted answer to that question. –  ziggystar Feb 13 '14 at 15:15

Adapting the solution of the following question (thanks to Claudio's comment): Creating a seamless XOR symbol as node

I ended up with this working and extremely simple code:

\begin{tikzpicture}[
every node/.style={draw,circle},
hVert/.style={append after command={(\tikzlastnode.north) edge (\tikzlastnode.south)}},
hHorz/.style={append after command={(\tikzlastnode.west) edge (\tikzlastnode.east)}}
]
\node[hVert] (a) {};
\node[right=of a,hVert,hHorz] (f) {};
\node[right=of f,hHorz] (b) {};
\end{tikzpicture}

-

Another option: declare three new shapes.

It would be better to declare only one new shape with some parameter to draw horizontal, vertical or both lines, but I don't know how to do it.

\documentclass[tikz, border=2mm]{standalone}

\makeatletter
\pgfdeclareshape{hVert}
{
\inheritsavedanchors[from=circle] % this is nearly a circle
\inheritanchorborder[from=circle]
\inheritanchor[from=circle]{north}
\inheritanchor[from=circle]{north west}
\inheritanchor[from=circle]{north east}
\inheritanchor[from=circle]{center}
\inheritanchor[from=circle]{west}
\inheritanchor[from=circle]{east}
\inheritanchor[from=circle]{mid}
\inheritanchor[from=circle]{mid west}
\inheritanchor[from=circle]{mid east}
\inheritanchor[from=circle]{base}
\inheritanchor[from=circle]{base west}
\inheritanchor[from=circle]{base east}
\inheritanchor[from=circle]{south}
\inheritanchor[from=circle]{south west}
\inheritanchor[from=circle]{south east}
\inheritbackgroundpath[from=circle]
\foregroundpath{
\centerpoint%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
}
}
\pgfdeclareshape{hHorz}
{
\inheritsavedanchors[from=circle] % this is nearly a circle
\inheritanchorborder[from=circle]
\inheritanchor[from=circle]{north}
\inheritanchor[from=circle]{north west}
\inheritanchor[from=circle]{north east}
\inheritanchor[from=circle]{center}
\inheritanchor[from=circle]{west}
\inheritanchor[from=circle]{east}
\inheritanchor[from=circle]{mid}
\inheritanchor[from=circle]{mid west}
\inheritanchor[from=circle]{mid east}
\inheritanchor[from=circle]{base}
\inheritanchor[from=circle]{base west}
\inheritanchor[from=circle]{base east}
\inheritanchor[from=circle]{south}
\inheritanchor[from=circle]{south west}
\inheritanchor[from=circle]{south east}
\inheritbackgroundpath[from=circle]
\foregroundpath{
\centerpoint%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
}
}
\pgfdeclareshape{hVertHorz}
{
\inheritsavedanchors[from=circle] % this is nearly a circle
\inheritanchorborder[from=circle]
\inheritanchor[from=circle]{north}
\inheritanchor[from=circle]{north west}
\inheritanchor[from=circle]{north east}
\inheritanchor[from=circle]{center}
\inheritanchor[from=circle]{west}
\inheritanchor[from=circle]{east}
\inheritanchor[from=circle]{mid}
\inheritanchor[from=circle]{mid west}
\inheritanchor[from=circle]{mid east}
\inheritanchor[from=circle]{base}
\inheritanchor[from=circle]{base west}
\inheritanchor[from=circle]{base east}
\inheritanchor[from=circle]{south}
\inheritanchor[from=circle]{south west}
\inheritanchor[from=circle]{south east}
\inheritbackgroundpath[from=circle]
\foregroundpath{
\centerpoint%
\pgf@xc=\pgf@x%
\pgf@yc=\pgf@y%
\pgfsetarrowsstart{}
\pgfsetarrowsend{}
}
}
\makeatother

\begin{document}
\begin{tikzpicture}
\node[hHorz,draw, thick, blue, fill=red!30] (A) at (0,0) {};
\node[hVert,draw, red, fill=blue!30, minimum size=.75cm] (B) at (1,1) {};
\node[hVertHorz,draw, thick,fill=red!30!blue] (C) at (2,0) {};
\draw (A)--(B)--(C);
\end{tikzpicture}

\end{document}


-
I thought about this. But I'm going to require even more decorations and the number of shapes would grow exponentially. Also I need to decorate both circles and squares. But maybe this solution serves someone else. –  ziggystar Feb 13 '14 at 19:00