Package

reftree

render

Permalink

package render

Visibility
  1. Public
  2. All

Type Members

  1. case class AnimationOptions(keyFrameDuration: FiniteDuration = 2.seconds, interpolationDuration: FiniteDuration = 1.seconds, framesPerSecond: Int = 9, loop: Boolean = true, onionSkinLayers: Int = 0) extends Product with Serializable

    Permalink

    Options for rendering animations

    Options for rendering animations

    keyFrameDuration

    the duration for key frames

    interpolationDuration

    the duration for interpolation segments between the key frames set to Duration.Zero to disable interpolation

    framesPerSecond

    the rate to use for interpolation (ignored when interpolation is off)

    loop

    whether the animation should be looped infinitely

    onionSkinLayers

    set to a positive number n to add n previous frames to each frame, with reduced opacity

  2. case class Renderer(renderingOptions: RenderingOptions = RenderingOptions(), animationOptions: AnimationOptions = AnimationOptions()) extends Product with Serializable

    Permalink

    This class provides functionality for rendering diagrams and animations

    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 org.scalajs.dom
    
    val renderer = Renderer(
      renderingOptions = RenderingOptions(density = 75)
    )
    
    // Conventional usage
    renderer
      .tweakRendering(_.withVerticalSpacing(2))
      .render(dom.document.body, Diagram(List(1)))
    
    // Sweet sugar, recommended
    import renderer._
    Diagram(List(1))
      .render(dom.document.body, _.withVerticalSpacing(2))
  3. case class RenderingOptions(verticalSpacing: Double = 0.8, palette: IndexedSeq[Color] = ..., font: String = DefaultRenderingOptions.font, density: Int = 100) extends Product with Serializable

    Permalink

    Options for rendering static diagrams

    Options for rendering static diagrams

    verticalSpacing

    vertical spacing to set for Graphviz

    palette

    a sequence of colors to be used

    font

    the font for text rendering

    density

    the desired image density, in pixels per inch

Value Members

  1. object DefaultRenderingOptions

    Permalink
  2. object VizFacade extends Object

    Permalink

    An interface to https://github.com/mdaines/viz.js/

    An interface to https://github.com/mdaines/viz.js/

    Annotations
    @native() @JSGlobalScope()

Ungrouped