Sha256: 7f3b51b4979cc8c17ed2c47f924c40f4ec2953ece00b7c2b511c0dbf3f00cc2e

Contents?: true

Size: 604 Bytes

Versions: 24

Compression:

Stored size: 604 Bytes

Contents

#!/usr/bin/ruby

$:.unshift( "../lib" );
require "graphviz"

g = nil
if ARGV[0]
  g = GraphViz::new( "structs", "path" => ARGV[0] )
else
  g = GraphViz::new( "structs" )
end

g.node["shape"] = "record"

struct1 = g.add_node( "struct1", "shape" => "record", "label" => "<f0> left|<f1> mid\ dle|<f2> right" )
struct2 = g.add_node( "struct2", "shape" => "record", "label" => "<f0> one|<f1> two" )
struct3 = g.add_node( "struct3", "shape" => "record", "label" => 'hello\nworld |{ b |{c|<here> d|e}| f}| g | h' )

g.add_edge( struct1, struct2 )
g.add_edge( struct1, struct3 )

g.output( :png => "#{$0}.png" )

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ruby-graphviz-1.0.2 examples/sample04.rb
ruby-graphviz-1.0.1 examples/sample04.rb
ruby-graphviz-1.0.0 examples/sample04.rb
ruby-graphviz-0.9.21 examples/sample04.rb
ruby-graphviz-0.9.20 examples/sample04.rb
ruby-graphviz-0.9.19 examples/sample04.rb
ruby-graphviz-0.9.18 examples/sample04.rb
ruby-graphviz-0.9.17 examples/sample04.rb
ruby-graphviz-0.9.16 examples/sample04.rb
ruby-graphviz-0.9.15 examples/sample04.rb
ruby-graphviz-0.9.14 examples/sample04.rb
ruby-graphviz-0.9.13 examples/sample04.rb
ruby-graphviz-0.9.12 examples/sample04.rb
ruby-graphviz-0.9.11 examples/sample04.rb
ruby-graphviz-0.9.10 examples/sample04.rb
ruby-graphviz-0.9.9 examples/sample04.rb
ruby-graphviz-0.9.8 examples/sample04.rb
ruby-graphviz-0.9.7 examples/sample04.rb
ruby-graphviz-0.9.6 examples/sample04.rb
ruby-graphviz-0.9.5 examples/sample04.rb