[Tex/LaTex] Automatically framing (or drawing the bounding box of ) a PStricks non-text object


Is there a command or macro that can draw and automatically size the bounding rectangle of a pstricks object, for example a circle — framing it tightly in effect, even when the object undergoes transformations such as rotations.

For example,

     \documentclass[english, landscape, a4paper]{slides}

        \pscircle(5,5){2} % I'd like to draw the bounding box of this object

Edit: the difficulty that I'm having is calculating the dimensions of the frame or bounding box.

Best Answer

  pstricks object with a pspicture environment

or if you do not have it outside of the pspicture environment

\documentclass[english, landscape, a4paper]{slides}
\usepackage{pstricks} \SpecialCoor
  \rput(#1){\psframe(!#2 neg dup)(!#2 dup)}%




enter image description here