Renderer - SwiftDocOrg/GraphViz GitHub Wiki
Renderer
A GraphViz renderer.
public class Renderer
Initializers
init(layout:options:)
Creates a renderer for the specified layout algorithm.
public init(layout: LayoutAlgorithm, options: Options = [])
Throws
CocoaError if the corresponding GraphViz tool isn't available.
Properties
layout
The layout algorithm used.
var layout: LayoutAlgorithm
options
The rendering options.
var options: Options = []
Methods
render(graph:to:)
Renders a graph to the specified output format.
public func render(graph: Graph, to format: Format) throws -> Data
Parameters
- graph: The graph to be rendered.
- format: The output format.
Throws
Error if GraphViz is unable to render.
render(dot:to:)
Renders a DOT-encoded string to the specified output format.
public func render(dot: String, to format: Format) throws -> Data
Parameters
- dot: A DOT-encoded string to be rendered.
- format: The output format.
Throws
Error if GraphViz is unable to render.