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
]
Manipulate
is for? It isn't clear exactly what you want -- in this example what value of d would you have like to have determined directly (in some way)? Is it the point that the two frames merge? $\endgroup$Text[]
withinGraphics[]
and Computing the bounding boxes for Text objects $\endgroup$