summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/control/ComponentDirection.lua
blob: f941ff226ece1093d3c98361bceb9953c62264e5 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
-- Copyright 2012 by Till Tantau
--
-- This file may be distributed an/or modified
--
-- 1. under the LaTeX Project Public License and/or
-- 2. under the GNU Public License
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information

-- @release $Header$


local declare       = require "pgf.gd.interface.InterfaceToAlgorithms".declare


---
-- @section subsubsection {Arranging Components in a Certain Direction}
--
-- @end

---

declare {
  key = "component direction",
  type = "direction",
  initial = "0",

  summary = [["
    The \meta{angle} is used to determine the relative position of each
    component relative to the previous one. The direction need not be a
    multiple of |90|. As usual, you can use texts like |up| or
    |right| instead of a number.
  "]],
  documentation = [["
    As the examples show, the direction only has an influence on the
    relative positions of the components, not on the direction of growth
    inside the components. In particular, the components are not rotated
    by this option in any way. You can use the |grow| option or |orient|
    options to orient individual components.
  "]],
  examples = {[["
    \tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
                  component direction=left]
      { a, b, c -- d -- e, f -- g };
  "]],[["
    \tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
                  component direction=10]
      { a, b, c -- d -- e, f -- g };
  "]],[["
    \tikz \graph [tree layout, nodes={inner sep=1pt,draw,circle},
                  component direction=up]
       { a, b, c [grow=right] -- d -- e, f[grow=45] -- g };
  "]]
  }
}


return Components