Package

com.github.mdr.ascii.layout

coordAssign

Permalink

package coordAssign

Visibility
  1. Public
  2. All

Type Members

  1. class EdgeBendCalculator extends AnyRef

    Permalink

    Calculate vertical ordering of row bends

  2. case class EdgeInfo(startVertex: Vertex, finishVertex: Vertex, startPort: Point, finishPort: Point, reversed: Boolean) extends Product with Serializable

    Permalink

    Information about edges that pass between two adjacent layers.

    Information about edges that pass between two adjacent layers.

    finishPort

    -- column is correct, but not row

  3. case class LayerInfo(vertexInfos: Map[Vertex, VertexInfo]) extends Translatable[LayerInfo] with Product with Serializable

    Permalink

    VertexInfo's for all the vertices in a single layer.

  4. class Layouter extends AnyRef

    Permalink
  5. case class VertexInfo(boxRegion: Region, greaterRegion: Region, inEdgeToPortMap: Map[Edge, Point], outEdgeToPortMap: Map[Edge, Point], selfInPorts: List[Point], selfOutPorts: List[Point]) extends Translatable[VertexInfo] with Product with Serializable

    Permalink

    Info for rendering a vertex.

    Info for rendering a vertex.

    greaterRegion

    - area including the zone for self-edges to be drawn

    inEdgeToPortMap

    - map of incoming edges to the points they connect to on the vertex box.

    outEdgeToPortMap

    - map of outgoing edges to the points they connect to on the vertex box.

  6. trait VertexRenderingStrategy[-V] extends AnyRef

    Permalink

    Control how a vertex box gets sized and populated in a graph drawing.

Value Members

  1. object Layouter

    Permalink
  2. object PortNudger

    Permalink

    Nudge edge ports to avoid overlapping vertical edge segments.

    Nudge edge ports to avoid overlapping vertical edge segments.

    If an edge starts at the same column as another edge finishes, there is a risk they could be drawn overlapping. This avoids the issue by moving the in port one column away (and we make the assumption that there is space for that).

    ╭─────╮ ╭─────╮ ╭─────╮ ╭─────╮ │ A │ │ B │ │ A │ │ B │ ╰─┬─┬─╯ ╰─┬─┬─╯ ╰─┬─┬─╯ ╰─┬─┬─╯ │ │ │ │ │ │ │ │ │ ╰─────┼ │ vs │ ╰─────┼╮│ │ ╭─────╯ │ │ ╭────╯││ │ │ │ │ │ │ ││ v v v v v v vv ╭─────╮ ╭─────╮ ╭─────╮ ╭─────╮ │ X │ │ Y │ │ X │ │ Y │ ╰─────╯ ╰─────╯ ╰─────╯ ╰─────╯

    Some of the overlaps can be avoided by ordering the edge rows, but not if the overlaps cause a cycle, as in the case above. Ideally, we would just nudge just enough vertices to break the cycle, and let edge ordering handle the rest, but at the moment we nudge everything.

  3. object ToStringVertexRenderingStrategy extends VertexRenderingStrategy[Any]

    Permalink

    Render a vertex by taking .toString, then centering it horizontally and vertically within the given region.

Ungrouped