# [Xy-pic] Rotating a frame

Joe Foley foley at MIT.EDU
Wed May 20 08:33:22 CEST 2009

Hi there.

I'm trying to make an updated squaredance diagram class and running into
a bit of a problem.  I need to make some boxes with dots and rotate them
at a 45 degree angle.  I know how to make the rotate package rotate
text, but I can't figure out how to get it to rotate the frame around
the text (nor the dot).  As an example:

\newenvironment{sqFormation}{$\begin{xy} 0;<5mm,0mm>: % set units to 5mm x 5mm } {\end{xy}$ }

\newcommand{\rotdancer}[3]{\POS(#1)*[@!45]=<5mm>[F]\txt{#2}="dancer",
\POS"dancer"!#3(1.1)*{\bullet},}

\xyoption{dvips}
\begin{document}

\begin{sqFormation}
\rotdancer{0,0}{U}{U}
\end{sqFormation}
\end{document}

Only rotates the U by 45 and not the box.  I think this should be
possible, but I'm missing something since the rotation modifier is
supposed to modify whatever the current object is.