I'm trying to "overload" a rectangle node as a custom shape, such that it has a circle on its south west corner. In the MWE below, I use \circsize to set the size of the circle - and for testing purposes, I both draw a circular path, and I draw a circular node. The output I get, however, is this:

... that is - even if I'm trying to apply \circsize to both the circle path and the circle node - they are output with different sizes! (Note that I unfortunately cannot even \typeout{\circsize}, so as to debug it).
Why does this happen - and how can I get both the node, and the path, to have the same size as specified by e.g. \circsize?
EDIT: to clarify the question: why do I get different sized circles, when I use the circle path primitive \pgfpathcircle{\southwest}{\circsize}, versus the circle node primitive \pgfnode{circle}{center}{}{\tikz@fig@name-A}{\pgfusepath{draw}} (with a \pgfkeys{/pgf/minimum size=\circsize} to specify size? How could I get those circles to be of equal size, by using \circsize as an argument for both?
The MWE:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\pgfkeys{/tikz/mycircsize/.initial = 0.3cm}
\makeatletter
\pgfdeclareshape{testshape}{
\inheritsavedanchors[from={rectangle}]
\inheritbackgroundpath[from={rectangle}]
\inheritanchorborder[from={rectangle}]
\foreach \x in {center,north east,north west,north,south,south east,south west,east,west}{
\inheritanchor[from={rectangle}]{\x}
}
\saveddimen\circsize{\pgf@x=\pgfkeysvalueof{/tikz/mycircsize}}
%\typeout{\the\circsize} % ! Undefined control sequence.
\foregroundpath{
\southwest
% just draw a circle path (and only it, a bit thicker)
\begin{pgfscope}
{
\pgfsetlinewidth{2pt} % no effect here ...
\pgfpathcircle{\southwest}{\circsize}
\pgfusepath{stroke} % ... unless 'usepath is used!
}
\end{pgfscope}
% draw a circular node
{
\color{red}
\pgfkeys{/pgf/minimum size=\circsize}
\pgfset{minimum size=\circsize}
\pgfkeys{/tikz/radius=0.5\circsize}
%\pgfset{inner sep=0pt}
\pgftransformshift{\southwest}
\pgfnode{circle}{center}{}{\tikz@fig@name-A}{\pgfusepath{draw}}
%\pgfusepath{stroke} % no need for this?
}
}
}
\makeatother
\begin{document}
\begin{tikzpicture}
\node[testshape,draw] (n1) at (1,0) {Testing};
\end{tikzpicture}
\end{document}


\circsizein there would result with the same size circle, and I was much surprised when I saw they weren't; so I wanted to know what is the cause. Otherwise, you're right - in the greater scope of things, of course I don't need to use them both. Many thanks for the help - cheers! – sdaau Apr 24 '14 at 12:55