blob: 77220a844dbc65e35e2f7b181c8e1051a4c9809b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
\documentclass{article}
\usepackage{tikz,tikz-qtree}
\usepackage{pgf,pgfsubpic}
\begin{document}
\fbox{%
\begin{pgfpicture}
\pgfnode{rectangle}{center}{Hello}{hellonode}{\pgfusepath{stroke}}
\begin{pgfsubpicture}
\pgfpathcircle{\pgfpointorigin}{4pt}\pgfusepath{stroke}
\pgfnode{rectangle}{center}{there}{therenode}{\pgfusepath{stroke}}
\end{pgfsubpicture}
\pgftransformshift{\pgfpoint{1in}{-1in}}
\pgftransformscale{2}
\pgftransformrotate{45}
\pgfpathcircle{\pgfpointorigin}{2pt}\pgfusepath{fill}
\pgfplacesubpicture
\pgfmoveto{\pgfpointanchor{hellonode}{south}}
\pgflineto{\pgfpointanchor{therenode}{north}}
\pgfusepath{stroke}
\end{pgfpicture}%
}
\begin{tikzpicture}
\begin{pgfscope}
\begin{pgfsubpicture}
\draw (-1in,0)--(2in,0)--(2in,2in)--(0,2in)--cycle;
\end{pgfsubpicture}
\pgffitsubpicture{\pgfpointorigin}{\pgfpoint{1in}{1in}}
\pgfplacesubpicture
\end{pgfscope}
\draw (0,0)--(1in,0)--(1in,1in)--(0,1in)--cycle;
\end{tikzpicture}
\end{document}
|