hps-0.14: Haskell Postscript

Safe HaskellSafe-Inferred



Path query functions and related operations.



startPt :: Path -> Maybe (Pt Double)Source

Locate the starting point of the path, which must begin with a MoveTo node.

endPt :: Path -> Maybe (Pt Double)Source

Locate the end point of the path.

mkValid :: Path -> PathSource

Ensure path begins with a MoveTo node.

approx :: Double -> Path -> PathSource

Approximate curves as n straight line segments. That is replace CurveTo nodes with n LineTo nodes calculated using bezier4.

close :: Path -> PathSource

Append a LineTo the start point of Path.