case class Renderer(renderingOptions: RenderingOptions = RenderingOptions(), animationOptions: AnimationOptions = AnimationOptions(), directory: Path = Paths.get("."), format: String = "png") extends Product with Serializable
This class provides functionality for rendering diagrams and animations
It can be used in two ways:
- conventionally, via the
render
methods; - with special syntax sugar, allowing
render
calls on the diagrams/animations themselves.
Usage examples:
import reftree.diagram.Diagram import java.nio.file.Paths val renderer = Renderer( renderingOptions = RenderingOptions(density = 75), directory = Paths.get("images", "usage") ) // With custom output format val renderer = Renderer( renderingOptions = RenderingOptions(density = 75), directory = Paths.get("images", "usage"), format = "ps" // Or any other format that compatible with dot -T ) // Conventional usage renderer .tweakRendering(_.withVerticalSpacing(2)) .render("list", Diagram(List(1))) // Sweet sugar, recommended import renderer._ Diagram(List(1)) .render("list", _.withVerticalSpacing(2))
- Self Type
- Renderer
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Renderer
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Renderer(renderingOptions: RenderingOptions = RenderingOptions(), animationOptions: AnimationOptions = AnimationOptions(), directory: Path = Paths.get("."), format: String = "png")
Type Members
- implicit class AnimationRenderSyntax extends AnyRef
Syntactic sugar for animations
- implicit class DiagramRenderSyntax extends AnyRef
Syntactic sugar for diagrams
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val animationOptions: AnimationOptions
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- val directory: Path
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val format: String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def render(name: String, animation: Animation): Unit
Render an animation to a GIF file with the given name (do not include the extension)
- def render(name: String, diagram: Diagram): Unit
Render a diagram to a file with the given name (do not include the extension)
- val renderingOptions: RenderingOptions
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tweakAnimation(tweak: (AnimationOptions) => AnimationOptions): Renderer
Tweak the animation options with the provided funciton
- def tweakRendering(tweak: (RenderingOptions) => RenderingOptions): Renderer
Tweak the rendering options with the provided funciton
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)