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
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val directory: Path
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val format: String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @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
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )