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

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

Wumpus.Drawing.Paths.Base.RelPath

Contents

Description

Relative path type - this should be more amenable for building complex drawings than the PrimPath type in Wumpus-Core.

Note - RelPath is not directly equivalent to AbsPath. AbsPath is more powerful - as it is expected to have more demanding use-cases (e.g. connector paths).

Synopsis

Relative path type

data RelPath u Source

Relative Path data type.

Note this type is more limited than AbsPath, it does not support introspective operations like length or anchors.

Instances

Functor RelPath 
(Ord u, Tolerance u) => Eq (RelPath u) 
Show u => Show (RelPath u) 
Monoid (RelPath u) 

Construction

empty :: RelPath uSource

An empty relative path is acceptible to Wumpus because it is always drawn as a LocGraphic.

line1 :: Vec2 u -> RelPath uSource

Create a relative path from a single straight line.

curve1 :: Vec2 u -> Vec2 u -> Vec2 u -> RelPath uSource

Create a relative path from a single Bezier curve.

Queries

Concat

consCurveTo :: Vec2 u -> Vec2 u -> Vec2 u -> RelPath u -> RelPath uSource

snocCurveTo :: RelPath u -> Vec2 u -> Vec2 u -> Vec2 u -> RelPath uSource

Conversion