Parent

GraphViz

>> x = "hellont\l"world""

> "hellont\l"world""

>> puts x.inspect.gsub( "\\", "\" ) "hellontl"world""

OR

>> x = 'hellontl"world"'

> "hello\n\t\l"world""

>> puts x.inspect.gsub( "\\", "\" ) "hellontl"world""


bool

For the bool type,

Example

graph[:center] = "true"

or

graph[:center] = true

or

graph[:center] = 23

TODO: Remove


spliteType or point

spline ( ';' spline )* where spline = (endp)? (startp)? point (triple)+ and triple = point point point and endp = "e,%f,%f" and startp = "s,%f,%f"

If a spline has points p1 p2 p3 ... pn, (n = 1 (mod 3)), the points correspond to the control points of a B-spline from p1 to pn. If startp is given, it touches one node of the edge, and the arrowhead goes from p1 to startp. If startp is not given, p1 touches a node. Similarly for pn and endp.

Public Class Methods

libxslt_transform(xml, xsl) click to toggle source
# File lib/graphviz/nothugly.rb, line 54
def self.libxslt_transform(xml, xsl)
   LibXML::XML.default_load_external_dtd = false
   LibXML::XML.default_substitute_entities = false

   stylesheet_doc = LibXML::XML::Document.file(xsl)
   stylesheet = LibXSLT::XSLT::Stylesheet.new(stylesheet_doc)
   xml_doc = LibXML::XML::Document.file(xml)
   stylesheet.apply(xml_doc).to_s
end
nothugly( file, save = true ) click to toggle source

Transform to pretty up the SVG output

For more information, see www.hokstad.com/making-graphviz-output-pretty-with-xsl.html and www.hokstad.com/making-graphviz-output-pretty-with-xsl-updated.html

You can use the :nothugly option to GraphViz#output :

graph.output( :svg => "myGraph.svg", :nothugly => true )

Or directly on an SVG output graph :

GraphViz.nothugly( "myGraph.svg" )
# File lib/graphviz/nothugly.rb, line 33
def self.nothugly( file, save = true )
  xsl = File.join( File.dirname(File.expand_path(__FILE__)), "nothugly", "nothugly.xsl" )
  out = self.send(XSLT_METHOD, file, xsl)

  if save
    fname = File.join( File.dirname(File.expand_path(file)), File.basename(file))
    File.open( fname, "w" ) { |io|
      io.print out
    }
  else
    return out
  end
end
xml_xslt_transform(xml, xsl) click to toggle source
# File lib/graphviz/nothugly.rb, line 47
def self.xml_xslt_transform(xml, xsl)
  xslt = XML::XSLT.new()
  xslt.xml = xml
  xslt.xsl = xsl
  xslt.serve()
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.