Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- penCircle :: Floating a => Pen a
- pathToPen :: Floating a => ClosedPath a -> Pen a
- penStrokeOpen :: Int -> Double -> Bool -> Pen Double -> OpenPath Double -> [ClosedPath Double]
- penStrokeClosed :: Int -> Double -> Bool -> Pen Double -> ClosedPath Double -> [ClosedPath Double]
- data Pen a
- bezierOffset :: CubicBezier Double -> Double -> Maybe Int -> Double -> Bool -> [CubicBezier Double]
Documentation
pathToPen :: Floating a => ClosedPath a -> Pen a Source #
Create a pen from a path. For predictable results the path should be convex.
penStrokeOpen :: Int -> Double -> Bool -> Pen Double -> OpenPath Double -> [ClosedPath Double] Source #
penStrokeClosed :: Int -> Double -> Bool -> Pen Double -> ClosedPath Double -> [ClosedPath Double] Source #
:: CubicBezier Double | The curve |
-> Double | Offset distance. |
-> Maybe Int | maximum subcurves |
-> Double | Tolerance. |
-> Bool | Calculate the curve faster but with more subcurves |
-> [CubicBezier Double] | The offset curve |
Calculate an offset path from the bezier curve to within tolerance. If the distance is positive offset to the left, otherwise to the right. A smaller tolerance may require more bezier curves in the path to approximate the offset curve