[Tex/LaTex] Setting minimum size for tikz node using default unit length

nodestikz-pgf

I have two node styles with a minimum size set to 7mm and they look perfect:

\begin{tikzpicture}

    \tikzstyle{style1} = [circle,draw,fill=white,minimum size=7mm,font=\Large];
    \tikzstyle{style2} = [rectangle,draw,fill=white,minimum size=7mm,font=\Large];

    \node (node1) at (0,0)  [style1] {1};
    \node (node2) at (1,0)  [style2] {A};

\end{tikzpicture}

enter image description here

But then I'd like to be able to scale the whole picture and have the minimum sizes scale accordingly (without having to set the scale parameter for every node style manually). Since the default unit length is 1cm, I figured I can change minimum size=7mm to minimum size= 0.7 but then the rectangle appears smaller:

enter image description here

Setting minimum size=20 gives the desired effect. It seems the units are not working the way I expect them to. What's going on here?

Best Answer

You can let the transformation apply to nodes via transform shape key.

\begin{tikzpicture}[
        style1/.style={circle,draw,fill=white,minimum size=7mm,font=\Large},
        style2/.style={rectangle,draw,fill=white,minimum size=7mm,font=\Large},
        transform shape
]

\foreach \x in {0.5,1,...,4}{
\begin{scope}[scale=\x,yshift=2cm]
    \node (node1) at (0,0)  [style1] {1};
    \node (node2) at (1,0)  [style2] {A};
\end{scope}
}
\end{tikzpicture}

enter image description here

Nevermind the fonts, it got stuck from a different answer.