wumpus-basic-0.17.0: Basic objects and system code built on Wumpus-Core.

PortabilityGHC
Stabilityhighly unstable
Maintainerstephen.tetley@gmail.com

Wumpus.Basic.Kernel.Objects.Displacement

Description

Displacing points - often start points.

Synopsis

Documentation

type PointDisplace u = Point2 u -> Point2 uSource

PointDisplace is a type representing functions from Point to Point.

It is especially useful for building composite graphics where one part of the graphic is drawn from a different start point to the other part.

type ThetaDisplace = Radian -> RadianSource

ThetaDisplace is a type representing functions from Radian to Radian.

It is especially useful for building composite graphics where one part of the graphic is drawn from a different start point to the other part.

type ThetaPointDisplace u = Radian -> Point2 u -> Point2 uSource

ThetaPointDisplace is a type representing functions from Radian * Point to Point.

It is useful for building arrowheads which are constructed with an implicit angle representing the direction of the line at the arrow tip.

moveStart :: PointDisplace u -> LocQuery u a -> LocQuery u aSource

Move the start-point of a LocQuery with the supplied displacement function.

moveStartTheta :: ThetaPointDisplace u -> LocThetaQuery u a -> LocThetaQuery u aSource

Move the start-point of a LocThetaQuery with the supplied displacement function.

moveStartThetaPoint :: PointDisplace u -> LocThetaQuery u a -> LocThetaQuery u aSource

Move the start-point of a LocThetaCF with the supplied displacement function.

moveStartThetaIncl :: ThetaDisplace -> LocThetaQuery u a -> LocThetaQuery u aSource

Change the inclination of a LocThetaCF with the supplied displacement function.

displace :: Num u => u -> u -> PointDisplace uSource

displace : x -> y -> PointDisplace

Build a combinator to move Points by the supplied x and y distances.

displaceVec :: Num u => Vec2 u -> PointDisplace uSource

displaceV : (V2 x y) -> PointDisplace

Version of displace where the displacement is supplied as a vector rather than two parameters.

displaceH :: Num u => u -> PointDisplace uSource

displaceH : x -> PointDisplace

Build a combinator to move Points by horizontally the supplied x distance.

displaceV :: Num u => u -> PointDisplace uSource

displaceV : y -> PointDisplace

Build a combinator to move Points vertically by the supplied y distance.

displaceParallel :: Floating u => u -> ThetaPointDisplace uSource

displaceParallel : dist -> ThetaPointDisplace

Build a combinator to move Points in parallel to the direction of the implicit angle by the supplied distance dist.

displacePerpendicular :: Floating u => u -> ThetaPointDisplace uSource

displaceParallel : dist -> ThetaPointDisplace

Build a combinator to move Points perpendicular to the inclnation of the implicit angle by the supplied distance dist.

displaceOrtho :: Floating u => Vec2 u -> ThetaPointDisplace uSource

displaceOrtho : vec -> ThetaPointDisplace

This is a combination of displaceParallel and displacePerpendicular, with the x component of the vector displaced in parallel and the y component displaced perpendicular.

centerRelative :: (CenterAnchor a, Fractional u, InterpretUnit u, u ~ DUnit a) => (Int, Int) -> a -> Query (Anchor u)Source

Absolute units.

left_of :: (CenterAnchor a, Fractional u, InterpretUnit u, u ~ DUnit a) => a -> Query (Anchor u)Source

Value is 1 snap move left.

This function should be considered obsolete, pending a re-think.

right_of :: (CenterAnchor a, Fractional u, InterpretUnit u, u ~ DUnit a) => a -> Query (Anchor u)Source

Value is 1 snap unit right.

This function should be considered obsolete, pending a re-think.

above_left_of :: (CenterAnchor a, Fractional u, InterpretUnit u, u ~ DUnit a) => a -> Query (Anchor u)Source

Value is 1 snap move up, 1 snap move left.

This function should be considered obsolete, pending a re-think.

above_right_of :: (CenterAnchor a, Fractional u, InterpretUnit u, u ~ DUnit a) => a -> Query (Anchor u)Source

Value is 1 snap move up, 1 snap move right.

This function should be considered obsolete, pending a re-think.

below_left_of :: (CenterAnchor a, Fractional u, InterpretUnit u, u ~ DUnit a) => a -> Query (Anchor u)Source

Value is 1 snap move down, 1 snap move left.

This function should be considered obsolete, pending a re-think.

below_right_of :: (CenterAnchor a, Fractional u, InterpretUnit u, u ~ DUnit a) => a -> Query (Anchor u)Source

Value is 1 snap move below, 1 snap move right.

This function should be considered obsolete, pending a re-think.