Module: Constants

Included in:
GraphViz, GraphViz::Edge, GraphViz::Node
Defined in:
lib/graphviz/constants.rb

Overview

Copyright © 2004, 2005, 2006, 2007, 2008 Gregoire Lejeune <[email protected]>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Constant Summary collapse

RGV_VERSION =
"0.9.4"
FORMATS =

Const: Output formats

[
  "bmp",
  "canon",
  "dot", 
  "xdot",
  "cmap", 
  "dia",
  "eps",
  "fig",
  "gd",
  "gd2",
  "gif",
  "gtk",
  "hpgl", 
  "ico",
  "imap", 
  "cmapx",
  "imap_np", 
  "cmapx_np",
  "ismap", 
  "jpeg", 
  "jpg", 
  "jpe", 
  "mif", 
  "mp",
  "pcl", 
  "pdf",
  "pic", 
  "plain", 
  "plain-ext",
  "png", 
  "ps", 
  "ps2",
  "svg", 
  "svgz",
  "tga",
  "tiff",
  "tif",
  "vml",
  "vmlz",
  "vrml", 
  "vtx", 
  "wbmp", 
  "xlib", 
  "none"
]
PROGRAMS =

Const: programs

[
  "dot",
  "neato",
  "twopi",
  "fdp",
  "circo"
]
GRAPHTYPE =

Const: graphs type

[
  "digraph",
 "graph"
]
GENCS_ATTRS =

E, N, G, S and C represent edges, nodes, the root graph, subgraphs and cluster subgraphs, respectively

{
  "Damping"             => "G",
  "K"                   => "GC",
  "URL"                 => "ENGC",
  "arrowhead"           => "E",
  "arrowsize"           => "E",
  "arrowtail"           => "E",
  "bb"                  => "G",
  "bgcolor"             => "GC",
#    "bottomlabel"         => "N",
  "center"              => "G",
  "charset"             => "G",
  "clusterrank"         => "G",
  "color"               => "ENC",
  "colorscheme"         => "ENCG",
  "comment"             => "ENG",
  "compound"            => "G",
  "concentrate"         => "G",
  "constraint"          => "E",
  "decorate"            => "E",
  "defaultdist"         => "G",
  "dim"                 => "G",
  "dir"                 => "E",
  "diredgeconstraints"  => "G",
  "distortion"          => "N",
  "dpi"                 => "G",
  "edgeURL"             => "E",
  "edgehref"            => "E",
  "edgetarget"          => "E",
  "edgetooltip"         => "E",
  "epsilon"             => "G",
  "esep"                => "G",
  "fillcolor"           => "NC",
  "fixedsize"           => "N",
  "fontcolor"           => "ENGC",
  "fontname"            => "ENGC",
  "fontnames"           => "G",
  "fontpath"            => "G",
  "fontsize"            => "ENGC",
  "group"               => "N",
  "headURL"             => "E",
  "headclip"            => "E",
  "headhref"            => "E",
  "headlabel"           => "E",
  "headport"            => "E",
  "headtarget"          => "E",
  "headtooltip"         => "E",
  "height"              => "N",
  "href"                => "E",
  "html"                => "N", # API extension
  "image"               => "N",
  "imagescale"          => "N",
  "label"               => "ENGC",
  "labelURL"            => "E",
  "labelangle"          => "E",
  "labeldistance"       => "E",
  "labelfloat"          => "E",
  "labelfontcolor"      => "E",
  "labelfontname"       => "E",
  "labelfontsize"       => "E",
  "labelhref"           => "E",
  "labeljust"           => "GC",
  "labelloc"            => "GCN",
  "labeltarget"         => "E",
  "labeltooltip"        => "E",
  "landscape"           => "G",
  "layer"               => "EN",
  "layers"              => "G",
  "layersep"            => "G",
  "len"                 => "E",
  "levelsgap"           => "G",
  "lhead"               => "E",
  "lp"                  => "EGC",
  "ltail"               => "E",
  "margin"              => "NG",
  "maxiter"             => "G",
  "mclimit"             => "G",
  "mindist"             => "G",
  "minlen"              => "E",
  "mode"                => "G",
  "model"               => "G",
  "mosek"               => "G",
  "nodesep"             => "G",
  "nojustify"           => "GCNE",
  "normalize"           => "G",
  "nslimit"             => "G",
  "nslimit1"            => "G",
  "ordering"            => "G",
  "orientation"         => "NG",
  "outputorder"         => "G",
  "overlap"             => "G",
  "pack"                => "G",
  "packmode"            => "G",
  "pad"                 => "G",
  "page"                => "G",
  "pagedir"             => "G",
  "pencolor"            => "C",
  "penwidth"            => "CNE",
  "peripheries"         => "NC",
  "pin"                 => "N",
  "pos"                 => "EN",
  "quantum"             => "G",
  "rank"                => "S",
  "rankdir"             => "G",
  "ranksep"             => "G",
  "ratio"               => "G",
  "rects"               => "N",
  "regular"             => "N",
  "remincross"          => "G",
  "resolution"          => "G",
  "root"                => "GN",
  "rotate"              => "G",
  "samehead"            => "E",
  "sametail"            => "E",
  "samplepoints"        => "G",
  "searchsize"          => "G",
  "sep"                 => "G",
  "shape"               => "N",
  "shapefile"           => "N",
  "showboxes"           => "ENG",
  "sides"               => "N",
  "size"                => "G",
  "skew"                => "N",
  "splines"             => "G",
  "start"               => "G",
  "style"               => "ENC",
  "stylesheet"          => "G",
  "tailURL"             => "E",
  "tailclip"            => "E",
  "tailhref"            => "E",
  "taillabel"           => "E",
  "tailport"            => "E",
  "tailtarget"          => "E",
  "tailtooltip"         => "E",
  "target"              => "ENGC",
  "tooltip"             => "NEC",
#    "toplabel"            => "N",
  "truecolor"           => "G",
  "vertices"            => "N",
  "viewport"            => "G",
  "voro_margin"         => "G",
  "weight"              => "E",
  "width"               => "N",
  "z"                   => "N"
}
GRAPHSATTRS =

Const: Graph attributs

Constants::getAttrsFor( :G ) + Constants::getAttrsFor( :S ) + Constants::getAttrsFor( :C )
NODESATTRS =

Const: Node attributs

Constants::getAttrsFor( :N )
EDGESATTRS =

Const: Edge attributs

Constants::getAttrsFor( :E )

Class Method Summary collapse

Class Method Details

.getAttrsFor(x) ⇒ Object



83
84
85
86
87
88
89
# File 'lib/graphviz/constants.rb', line 83

def self.getAttrsFor( x )
  r = []
  GENCS_ATTRS.each { |k,v|
    r << k if /#{x}/.match( x.to_s ) and not r.include?( k )
  }
  r
end