Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Library of connector paths...
** WARNING ** this module is experimental and may change significantly in future revisions.
- type ConnectorPath u = Point2 u -> Point2 u -> Path u
- type DConnectorPath = ConnectorPath Double
- connLine :: Floating u => ConnectorPath u
- connRightVH :: Floating u => ConnectorPath u
- connRightHV :: Floating u => ConnectorPath u
- connRightVHV :: Floating u => u -> ConnectorPath u
- connRightHVH :: Floating u => u -> ConnectorPath u
- connIsosceles :: (Real u, Floating u) => u -> ConnectorPath u
- connIsosceles2 :: (Real u, Floating u) => u -> ConnectorPath u
- connLightningBolt :: (Real u, Floating u) => u -> ConnectorPath u
- connIsoscelesCurve :: (Real u, Floating u) => u -> ConnectorPath u
- connSquareCurve :: (Real u, Floating u) => ConnectorPath u
- connUSquareCurve :: (Real u, Floating u) => ConnectorPath u
- connTrapezoidCurve :: (Real u, Floating u) => u -> u -> ConnectorPath u
- connZSquareCurve :: (Real u, Floating u) => ConnectorPath u
- connUZSquareCurve :: (Real u, Floating u) => ConnectorPath u
Documentation
type ConnectorPath u = Point2 u -> Point2 u -> Path uSource
connLine :: Floating u => ConnectorPath uSource
Connect with a straight line.
connRightVH :: Floating u => ConnectorPath uSource
Right-angled connector - go vertical, then go horizontal.
connRightHV :: Floating u => ConnectorPath uSource
Right-angled connector - go horizontal, then go vertical.
connRightVHV :: Floating u => u -> ConnectorPath uSource
Right-angled connector - go vertical for the supplied distance, go horizontal, go vertical again for the remaining distance.
connRightHVH :: Floating u => u -> ConnectorPath uSource
Right-angled connector - go horizontal for the supplied distance, go verical, go horizontal again for the remaining distance.
connIsosceles :: (Real u, Floating u) => u -> ConnectorPath uSource
Triangular joint.
u
is the altitude of the triangle.
connIsosceles2 :: (Real u, Floating u) => u -> ConnectorPath uSource
Double triangular joint.
u
is the altitude of the triangle.
connLightningBolt :: (Real u, Floating u) => u -> ConnectorPath uSource
Lightning bolt joint - a two joint connector with an axis perpendicular to the connector direction.
u
is the half length of the of the axis.
connIsoscelesCurve :: (Real u, Floating u) => u -> ConnectorPath uSource
Form a curve inside an isosceles triangle.
The two Bezier control points take the same point - the altitude of the triangle. The curve tends to be quite shallow relative to the altitude.
u
is the altitude of the triangle.
connSquareCurve :: (Real u, Floating u) => ConnectorPath uSource
Form a curve inside a square.
The two Bezier control points take the top corners. The curve tends to be very deep.
connUSquareCurve :: (Real u, Floating u) => ConnectorPath uSource
Form a curve inside a square.
As per connSquareCurve
but the curve is drawn underneath
the line formed between the start and end points.
(Underneath is modulo the direction, of course).
connTrapezoidCurve :: (Real u, Floating u) => u -> u -> ConnectorPath uSource
altitude * ratio_to_base
Form a curve inside a trapeziod.
connZSquareCurve :: (Real u, Floating u) => ConnectorPath uSource
Make a curve within a square, following the corner points as a Z.
connUZSquareCurve :: (Real u, Floating u) => ConnectorPath uSource
Make a curve within a square, following the corner points as a Z.
The order of tracing flips the control points, so this is an
underneath version of connZSquareCurve
.