File: sample30.rb

package info (click to toggle)
ruby-graphviz 1.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,156 kB
  • sloc: ruby: 7,682; xml: 26; makefile: 17
file content (12 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/ruby

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

GraphViz.new(:g){ |g|
  g[:center] = true
  a = g.add_nodes("A", :shape => "sdl_procedure_start", :peripheries => 0 )
  b = g.add_nodes("B", :shape => "sdl_save", :peripheries => 0)
  c = g.add_nodes("n", :shape => "box", :label => "\\G::\\N\\r")
  a << b << c
}.save( :ps => "#{$0}.ps", :extlib => File.join( File.dirname(__FILE__), "sdlshapes", "sdl.ps" ) )