summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua37
1 files changed, 28 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua
index f18aa43f450..c287181992f 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua
@@ -7,7 +7,7 @@
--
-- See the file doc/generic/pgf/licenses/LICENSE for more information
--- @release $Header: /cvsroot/pgf/pgf/generic/pgf/graphdrawing/lua/pgf/gd/model/Vertex.lua,v 1.6 2013/12/20 14:44:47 tantau Exp $
+-- @release $Header$
---
@@ -22,7 +22,7 @@
-- be modified directly.
--
-- Note that a |Vertex| is an abstraction of \tikzname\ nodes; indeed
--- that objective is to ensure that, in principle, we can use them
+-- the objective is to ensure that, in principle, we can use them
-- independently of \TeX. For this reason, you will not find any
-- references to |tex| inside a |Vertex|; this information is only
-- available in the syntactic digraph.
@@ -91,6 +91,22 @@
--
-- @field options A table of options that contains user-defined options.
--
+-- @field animations An array of attribute animations for the
+-- node. When an algorithm adds entries to this array, the display
+-- layer should try to render these. The syntax is as follows: Each
+-- element in the array is a table with a field |attribute|, which must
+-- be a string like |"opacity"| or |"translate"|, a field |entries|,
+-- which must be an array to be explained in a moment, and field
+-- |options|, which must be a table of the same syntax as the
+-- |options| field. For the |entries| array, each element must be
+-- table with two field: |t| must be set to a number, representing a
+-- time in secondds, and |value|, which must be set to a value that
+-- the |attribute| should have at the given time. The entries and the
+-- options will then be interpreted as described in \pgfname's basic
+-- layer animation system, except that where a |\pgfpoint| is expected
+-- you provide a |Coordinate| and a where a path is expected you
+-- provide a |Path|.
+--
-- @field shape A string describing the shape of the node (like |rectangle|
-- or |circle|). Note, however, that this is more ``informative''; the
-- actual information that is used by the graph drawing system for
@@ -104,6 +120,13 @@
-- @field event The |Event| when this vertex was created (may be |nil|
-- if the vertex is not part of the syntactic digraph).
--
+-- @field incomings A table indexed by |Digraph| objects. For each
+-- digraph, the table entry is an array of all vertices from which
+-- there is an |Arc| to this vertex. This field is internal and may
+-- not only be accessed by the |Digraph| class.
+--
+-- @field outgoings Like |incomings|, but for outgoing arcs.
+--
local Vertex = {}
Vertex.__index = Vertex
@@ -137,16 +160,11 @@ local Storage = require "pgf.gd.lib.Storage"
-- \item[|path|] A |Path| object representing the vertex's hull.
-- \item[|anchors|] A table of anchors.
-- \item[|options|] An options table for the vertex.
+-- \item[|animations|] An array of generated animation attributes.
-- \item[|shape|] A string describing the shape. If not given, |"none"| is used.
-- \item[|kind|] A kind like |"node"| or |"dummy"|. If not given, |"dummy"| is used.
-- \end{description}
--
--- @field incomings A table indexed by |Digraph| objects. For each
--- digraph, the table entry is an array of all vertices from which
--- there is an |Arc| to this vertex. This field is internal and may
--- not only be accessed by the |Digraph| class.
--- @field outgoings Like |incomings|, but for outgoing arcs.
---
-- @return A newly allocated node.
--
function Vertex.new(values)
@@ -162,6 +180,7 @@ function Vertex.new(values)
new.kind = new.kind or "dummy"
new.pos = new.pos or Coordinate.new(0,0)
new.anchors = new.anchors or { center = Coordinate.new(0,0) }
+ new.animations = new.animations or {}
return setmetatable (new, Vertex)
end
@@ -274,4 +293,4 @@ end
-- Done
-return Vertex \ No newline at end of file
+return Vertex