0
$\begingroup$

Possible Duplicate:
Dimensions of the results of Text[] within Graphics[]

In writing the following code, I had to figure out what values to give d by trial and error. Is there a way to extract the coordinates of a box directly?

sty[list_] := 
 Framed[Style[list, Medium, 12, FontFamily -> "Arial", 
   Background -> White]]

listy[list_, place_] := Text[sty[Grid[list]], place]

Manipulate[
 Graphics[
  If[d < .675,
   {
    listy[{{2, 12, 7}}, {d, 0}],
    listy[{{5, 7}}, {2 - d, 0}]
    },
   {
    listy[{{2, 12, 7, 5, 7}}, {.93, 0}]
    }
   ],
  PlotRange -> {{-.5, 2.5}, {-.2, .2}},
  ImageSize -> 200,
  AspectRatio -> Automatic
  ],
 {{d, .6, ""}, .6, .77},
 ControlPlacement -> Bottom,
 Paneled -> False, SaveDefinitions -> True
 ]
$\endgroup$

Browse other questions tagged or ask your own question.