wumpus-drawing-0.4.0: High-level drawing objects built on Wumpus-Basic.

PortabilityGHC
Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>

Wumpus.Drawing.Connectors.Base

Description

Connectors...

Synopsis

Documentation

type Connector u = ConnectorQuery u (AbsPath u)Source

The type of Connectors - a query from start and end point to a Path.

data ArrowTip Source

Arrowhead algorithm - the components of an arrowhead.

Retract distance may have to account for line width.

leftArrow :: (Real u, Floating u, InterpretUnit u) => ArrowTip -> Connector u -> ArrowConnector uSource

Connector with an arrow tip at the start point (i.e left).

rightArrow :: (Real u, Floating u, InterpretUnit u) => ArrowTip -> Connector u -> ArrowConnector uSource

Connector with an arrow tip at the end point (i.e right).

leftRightArrow :: (Real u, Floating u, InterpretUnit u) => ArrowTip -> ArrowTip -> Connector u -> ArrowConnector uSource

Connector with different arrow tips at the start point and end points.

uniformArrow :: (Real u, Floating u, InterpretUnit u) => ArrowTip -> Connector u -> ArrowConnector uSource

Connector with the same arrow tip at the start point and end points.

rightArrowPath :: (Real u, Floating u, InterpretUnit u) => ArrowTip -> AbsPath u -> Image u (AbsPath u)Source

Path with an arrow tip at the end point (i.e right).

TODO - shortening a curve does not seem to be working properly...

buildConn :: (Real u, Floating u, InterpretUnit u) => (Point2 u -> Point2 u -> Image u a) -> ConnectorImage u aSource

Promote a function from source and dest points to a connector function accounting for the separator values in the DrawingContext.

This should be used instead of promoteConn for functions building connectors.