gelatin-0.0.0.2: An experimental real time renderer.

Safe HaskellNone
LanguageHaskell2010

Gelatin.Core.Rendering.Polylines

Synopsis

Documentation

polygonExpand :: Float -> [V2 Float] -> [V2 Float] Source

outlinePolyline :: EndCap -> LineJoin -> Float -> [V2 Float] -> [V2 Float] Source

The polyline outline of another polyline drawn at a given thickness.

polyline :: EndCap -> LineJoin -> Float -> [V2 Float] -> [Triangle (V2 Float)] Source

tangentPoints :: Joint -> ([V2 Float], [V2 Float]) Source

Returns the points in a joint separated by the line's winding direction. Points on the side of the line in the positive tangent direction are fst and points in the negative tangent direction are snd.

joints :: EndCap -> LineJoin -> Float -> [V2 Float] -> [Joint] Source

capFunc :: EndCap -> Float -> V2 Float -> V2 Float -> Joint Source

miters :: LineJoin -> Float -> [V2 Float] -> [Joint] Source

miterFunc :: LineJoin -> Float -> V2 Float -> V2 Float -> V2 Float -> Joint Source

bevelJoint :: Float -> V2 Float -> V2 Float -> V2 Float -> Joint Source

miterJoint :: Float -> V2 Float -> V2 Float -> V2 Float -> Joint Source

miterLine :: Join -> V2 Float -> (V2 Float, V2 Float) Source

Finds the miter line through a midpoint for a given join.

join :: Float -> V2 Float -> V2 Float -> V2 Float -> Join Source

Finds the joint of three points with a thickness. A join with a positive angle denotes an elbow that bends counter-clockwise. A join with a negative angle denotes an elbow that bends clockwise. The join with an angle == 0 is the join of two parallel lines. The join with an angle == pi is the join of two opposite but parallel lines, which is used to denote a line cap.

capJoin :: Float -> V2 Float -> V2 Float -> Join Source

Finds the join of a start or end line with a thickness.

tangentOf :: V2 Float -> V2 Float -> V2 Float -> V2 Float Source

Finds the tangent of an elbow.

angleBetween :: V2 Float -> V2 Float -> Float Source

Finds the angle between two vectors.

data Join Source

A join is the 'miter line' that runs through the shared point of two lines perpendicular to their tangent.

Constructors

Join 

Fields

Instances

Eq Join Source 

Methods

(==) :: Join -> Join -> Bool

(/=) :: Join -> Join -> Bool

Show Join Source 

Methods

showsPrec :: Int -> Join -> ShowS

show :: Join -> String

showList :: [Join] -> ShowS