package drawing
- Alphabetic
- Public
- All
Type Members
- case class Drawing(elements: List[DrawingElement]) extends Transposable[Drawing] with Product with Serializable
-
sealed
trait
DrawingElement extends Translatable[DrawingElement] with Transposable[DrawingElement]
An element of a visual depiction of a graph.
-
case class
EdgeDrawingElement(bendPoints: List[Point], hasArrow1: Boolean, hasArrow2: Boolean) extends DrawingElement with Translatable[EdgeDrawingElement] with Transposable[EdgeDrawingElement] with Product with Serializable
Start and finish points of the edge should not intersect the vertex boxes.
Start and finish points of the edge should not intersect the vertex boxes.
- bendPoints
-- points of flex in the edge, includes start (first) and finish (last) points
- hasArrow1
-- has an arrow at the start point.
- hasArrow2
-- has an arrow at the finish point.
-
case class
EdgeSegment(start: Point, direction: Direction, finish: Point) extends HasRegion with Product with Serializable
A horizontal or vertical segment of an edge.
A horizontal or vertical segment of an edge. Includes all points in the segment, so overlaps with other segments on the bend points.
-
case class
EdgeSegmentInfo(edgeElement: EdgeDrawingElement, segment1: EdgeSegment, segment2: EdgeSegment, segment3: EdgeSegment) extends Product with Serializable
Information about a horizontal edge segment (segment2) and the previous and next vertical segments (segment2 and segment3 respectively).
Information about a horizontal edge segment (segment2) and the previous and next vertical segments (segment2 and segment3 respectively).
│ 1 │ 2 ╰────────────╮ │ 3 v
-
class
EdgeTracker extends AnyRef
Keep track of vertex regions, and horizontal and vertical edge segments as we move them around, so we can detect collisions.
-
class
Grid extends AnyRef
Array of characters used to render the final diagram
-
class
OccupancyGrid extends AnyRef
Mutable 2D representation of whether or not positions are occupied.
- class Renderer extends AnyRef
-
case class
VertexDrawingElement(region: Region, textLines: List[String]) extends DrawingElement with Translatable[VertexDrawingElement] with Transposable[VertexDrawingElement] with HasRegion with Product with Serializable
- textLines
-- each element is a row of text to be rendered inside the vertex.
Value Members
- object BoxDrawingCharacters
-
object
EdgeElevator
Raise edges if there are no conflicting diagram elements.
Raise edges if there are no conflicting diagram elements. For example:
╭───────╮ ╭───────╮ │ A │ │ A │ ╰─┬─┬─┬─╯ ╰─┬─┬─┬─╯ │ │ │ │ │ │ │ │ ╰────╮ ╭──╯ ╰╮╰────╮ │ ╰╮ │ => │ │ │ ╭──╯ │ │ │ │ │ │ │ │ │ │ │ v v v v v v ╭───╮ ╭───╮ ╭───╮ ╭───╮ ╭───╮ ╭───╮ │ B │ │ C │ │ D │ │ B │ │ C │ │ D │ ╰───╯ ╰───╯ ╰───╯ ╰───╯ ╰───╯ ╰───╯
-
object
KinkRemover
Remove kinks in edges where this can be achieved by removing an edge segment.
Remove kinks in edges where this can be achieved by removing an edge segment. For example:
╭───────────╮ ╭───────────╮ │Aberystwyth│ │Aberystwyth│ ╰─────┬─────╯ ╰─┬─────────╯ │ ==> │ ╭───╯ │ │ │ v v ╭───╮ ╭───╮ │ X │ │ X │ ╰───╯ ╰───╯
-
object
RedundantRowRemover
Delete redundant rows that consist of nothing but vertical edges:
Delete redundant rows that consist of nothing but vertical edges:
╭───────╮ ╭───────╮ │ A │ │ A │ ╰─┬─┬─┬─╯ ╰─┬─┬─┬─╯ │ │ │ │ │ │ ╭──╯ ╰╮╰────╮ ╭──╯ ╰╮╰────╮ │ │ │ => │ │ │ │ │ │ v v v │ │ │ ╭───╮ ╭───╮ ╭───╮ v v v │ B │ │ C │ │ D │ ╭───╮ ╭───╮ ╭───╮ ╰───╯ ╰───╯ ╰───╯ │ B │ │ C │ │ D │ ╰───╯ ╰───╯ ╰───╯
- object Renderer