semagrams.layout
This contains a variety of utility functions for computing the layout of a Semagram.
Attributes
Members list
Type members
Classlikes
An object containing several basic instances of BoxPosition
An object containing several basic instances of BoxPosition
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Align.type
An implementation of BoxPosition that works by matching up the two
points in the window and the box given by windowPoint
and boxPoint
An implementation of BoxPosition that works by matching up the two
points in the window and the box given by windowPoint
and boxPoint
Attributes
- boxPoint
the point relative to the box to align to
- windowPoint
the point relative to the window to align to
- Graph
- Supertypes
The data describing the geometry of a box
The data describing the geometry of a box
Attributes
- dims
the dimensions of the box
- pos
the top-left corner of the box
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
A reference to a point in coordinates relative to a box
A reference to a point in coordinates relative to a box
Attributes
- offset
An offset in absolute coordinates from
point
- point
A point in the coordinate scale where 0+0i is the top left corner of the box, and 1+1i is the bottom right.
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
An implementation of BoxPosition is a description of how to place a box in a window.
An implementation of BoxPosition is a description of how to place a box in a window.
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- class AlignPoints
An implementation of Spacer that assigns from
to 0
and to
to
n-1
, with the rest of the elements evenly spaced between them.
An implementation of Spacer that assigns from
to -1
and to
to n
,
with the rest of the elements evenly space between them.
An implementation of Spacer that assigns from
to -1
and to
to n
,
with the rest of the elements evenly space between them.
Useful when you want to, for instance, put ports evenly on a side of a box but you don't want to put ports on the corners of the box.
Attributes
- Graph
- Supertypes
An implementation of Spacer that spaces the elements according to a
fixed spacing. If centered
is true, then the elements are spaced centered
around 0, otherwise the elements are spaced starting from 0.
An implementation of Spacer that spaces the elements according to a
fixed spacing. If centered
is true, then the elements are spaced centered
around 0, otherwise the elements are spaced starting from 0.
Useful for assigning bends to the edges going between two vertices.
Attributes
- Graph
- Supertypes
An implementation of this trait describes how to assign real numbers to elements of a finite set {0,...,n-1}.
An implementation of this trait describes how to assign real numbers to elements of a finite set {0,...,n-1}.
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
Value members
Concrete methods
Evenly space the edges in an acset by assigning bends to them
Evenly space the edges in an acset by assigning bends to them
Attributes
- a
the acset to assign bends to.
- edges
a collection of objects to assign bends to, along with a source and target for each object. We want multiple objects because there could be different types of edge that all need to be spaced together.
- spacing
the increment between bends of adjacent edges