| 1 |
\begin{tikzpicture}[font=\sffamily,>=latex] |
| 2 |
\def\text{\scalebox{10}{Xy}} |
| 3 |
\sbox\mybox{\pgfinterruptpicture\sffamily\color{black!25}\scalebox{10}{Xy}\endpgfinterruptpicture} |
| 4 |
\def\HEIGHT{\ht\mybox} |
| 5 |
\def\WIDTH{\wd\mybox} |
| 6 |
\def\DEPTH{\dp\mybox} |
| 7 |
\def\LLX{.15\WIDTH} |
| 8 |
\def\LLY{.5\DEPTH} |
| 9 |
\def\URX{.15\WIDTH} |
| 10 |
\def\URY{.25\HEIGHT} |
| 11 |
\node [inner sep=0pt,anchor=base west] {\usebox\mybox}; |
| 12 |
\draw (0,0) -- (\WIDTH,0);% node [above,midway] {baseline}; |
| 13 |
\begin{scope}[blue,every node/.append style={inner sep=2pt}] |
| 14 |
\begin{scope} |
| 15 |
\draw ([shift={(-\LLX,-\LLY)}]0,-\DEPTH) rectangle ([shift={(\URX,\URY)}]\WIDTH,\HEIGHT); |
| 16 |
\end{scope} |
| 17 |
\draw [->] (.5\WIDTH,-\DEPTH) -- ++(0,-\LLY) node [right,midway] {\scriptsize lly}; |
| 18 |
\draw [->] (0,.5*\HEIGHT-.5*\DEPTH) -- ++(-\LLX,0) node [above,midway] {\scriptsize llx}; |
| 19 |
\draw (-\LLX,0) -- ([shift={(+\URX,0)}]\WIDTH,0); |
| 20 |
\draw [->] (.5\WIDTH,\HEIGHT) -- ++(0,\URY) node [right,midway] {\scriptsize ury}; |
| 21 |
\draw [->] (\WIDTH,.5*\HEIGHT-.5*\DEPTH) -- ++(\URX,0) node [above,midway] {\scriptsize urx}; |
| 22 |
\path [fill=white,draw] (-\LLX,0) circle (1pt); |
| 23 |
\end{scope} |
| 24 |
\draw [thick] (0,-\DEPTH) rectangle (\WIDTH,\HEIGHT); |
| 25 |
\path [fill=white,draw=black] (0,0) circle (1pt); |
| 26 |
\path let |
| 27 |
\p1 = (current bounding box.south west), |
| 28 |
\p2 = (current bounding box.north east), |
| 29 |
\p3 = (0,-\DEPTH), |
| 30 |
\p4 = (\WIDTH,\HEIGHT) |
| 31 |
in |
| 32 |
(\x3-\x2+\x4,\y3) rectangle (\x4+\x3-\x1,\y4); |
| 33 |
\end{tikzpicture} |