| 1 |
|
| 2 |
\def\text{\sffamily\scalebox{10}{Xy}} |
| 3 |
\sbox\mybox{\sffamily\color{black!25}\scalebox{10}{Xy}} |
| 4 |
\def\HEIGHT{\ht\mybox} |
| 5 |
\def\WIDTH{\wd\mybox} |
| 6 |
\def\DEPTH{\dp\mybox} |
| 7 |
\def\LLX{.15\WIDTH} |
| 8 |
\def\LLY{\DEPTH+.15\HEIGHT} |
| 9 |
\def\URX{.15\WIDTH} |
| 10 |
\def\URY{.25\HEIGHT} |
| 11 |
\begin{tikzpicture}[font=\sffamily,>=latex] |
| 12 |
\draw [gray,thin] |
| 13 |
(0,0) -- +(-3.5ex,0) |
| 14 |
(0,\HEIGHT) -- +(-3.5ex,0) |
| 15 |
(0,-\DEPTH) -- +(-3.5ex,0) |
| 16 |
(\WIDTH,\HEIGHT) -- +(3.5ex,0) |
| 17 |
(\WIDTH,-\DEPTH) -- +(3.5ex,0) |
| 18 |
(0,-\DEPTH) -- +(0,-3.5ex) |
| 19 |
(\WIDTH,-\DEPTH) -- +(0,-3.5ex) |
| 20 |
; |
| 21 |
\node [inner sep=0pt,anchor=base west] {\usebox\mybox}; |
| 22 |
\draw (0,0) -- (\WIDTH,0);% node [above,midway] {baseline}; |
| 23 |
\draw [->] (-2.5ex,0) -- +(0,-\DEPTH) node [midway,left] {depth}; |
| 24 |
\draw [->] (-2.5ex,0) -- +(0, \HEIGHT) node [midway,left] {height}; |
| 25 |
\draw [<->] (\WIDTH,-\DEPTH) ++(2.5ex,0) -- +(0,\DEPTH+\HEIGHT) node [midway,right] {totalheight}; |
| 26 |
\draw [<->] (0,-\DEPTH) ++(0,-2.5ex) -- +(\WIDTH,0) node [midway,below] {width}; |
| 27 |
\fill (-2.5ex,0) circle (.5pt); |
| 28 |
\begin{scope}[blue] |
| 29 |
\clip ([shift={(\LLX,\LLY)}]0,-\DEPTH) rectangle ([shift={(-\URX,-\URY)}]\WIDTH,\HEIGHT); |
| 30 |
\node [inner sep=0pt,anchor=base west,color=blue!50!white] {\text}; |
| 31 |
\end{scope} |
| 32 |
\begin{scope}[blue] |
| 33 |
\draw ([shift={(\LLX,\LLY)}]0,-\DEPTH) rectangle ([shift={(-\URX,-\URY)}]\WIDTH,\HEIGHT); |
| 34 |
\draw (\LLX,-\DEPTH+\LLY) -- ([shift={(-\URX,0)}]\WIDTH,-\DEPTH+\LLY); |
| 35 |
\draw [->] (\LLX+.2\WIDTH,-\DEPTH+\LLY) -- (\LLX+.2\WIDTH,0) node [right,midway] {\scriptsize moves down}; |
| 36 |
\path [fill=white,draw] (\LLX,-\DEPTH+\LLY) circle (1pt); |
| 37 |
\end{scope} |
| 38 |
\begin{scope}[blue!50!black] %,every node/.append style={inner sep=2pt}] |
| 39 |
\draw [->] (\LLX,0) -- (\LLX,\LLY-\DEPTH) node [right,midway] {\scriptsize lly}; |
| 40 |
\draw [->] (0,-\DEPTH+\LLY) -- ++(\LLX,0) node [above,midway] {\scriptsize llx}; |
| 41 |
\draw [->] |
| 42 |
([shift={(-\URX,0)}]\WIDTH,0) -- |
| 43 |
([shift={(-\URX,-\URY)}]\WIDTH,\HEIGHT) |
| 44 |
node [right,midway] {\scriptsize ury} |
| 45 |
; |
| 46 |
\draw [->] |
| 47 |
([shift={(0,-\URY)}]0,\HEIGHT) -- |
| 48 |
([shift={(-\URX,-\URY)}]\WIDTH,\HEIGHT) |
| 49 |
node [above,midway] {\scriptsize urx} |
| 50 |
; |
| 51 |
\end{scope} |
| 52 |
\draw [thick] (0,-\DEPTH) rectangle (\WIDTH,\HEIGHT); |
| 53 |
\path [fill=white,draw=black] (0,0) circle (1pt); |
| 54 |
\path let |
| 55 |
\p1 = (current bounding box.south west), |
| 56 |
\p2 = (current bounding box.north east), |
| 57 |
\p3 = (0,-\DEPTH), |
| 58 |
\p4 = (\WIDTH,\HEIGHT) |
| 59 |
in |
| 60 |
(\x3-\x2+\x4,\y3) rectangle (\x4+\x3-\x1,\y4); |
| 61 |
\end{tikzpicture} |