aboutsummaryrefslogtreecommitdiff
path: root/slides/2019-it-intro-computer-systems/img/computer-system.tex
blob: 79668686cc316ae0ecc9ca13651d80e5ccecf356 (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
\begin{tikzpicture}[
  -latex,
  entity/.style = {
    draw=lightGray,
    top color=lightGray,
    bottom color=white,
    rectangle,
    shading=axis,
    minimum width=2cm,
  },
  nop/.style = {
    draw=none,
  },
  frame/.style = {
    draw,
    -,
    dashed,
    thick,
    rounded corners,
  },
  label/.style = {
    draw=none,
  },
]
  % Software and hardware
  \node[entity] (hardware) at (0,0) {hardware};
  \node[entity, above=12pt of hardware] (software) {software};
  \node[nop] at ($ (software) !.5! (hardware) $) {+};
  \coordinate (l) at ($ (current bounding box.west)  + (-0.5,  0  ) $);
  \coordinate (r) at ($ (current bounding box.east)  + ( 0.5,  0  ) $);
  \coordinate (b) at ($ (current bounding box.south) + ( 0,   -0.5) $);
  \coordinate (t) at ($ (current bounding box.north) + ( 0,    0.5) $);
  \path[frame]
    (l) |- (t)
      node[label,below]{computer system} -|
    (r) |- (b) -| (l);

  % User and data
  \node[nop, above=of t] (user) {\includegraphics[width=1cm]{img/user}};
  \node[nop, above=-10pt of user] {user};
  \draw[latex-latex] (user) -- node[label,right]{data} ($ (t) + (0, 0.25) $);
\end{tikzpicture}