cubicbezier-0.6.0.6: Efficient manipulating of 2D cubic bezier curves.

Safe HaskellNone
LanguageHaskell98

Geom2D.CubicBezier.Stroke

Synopsis

Documentation

penCircle :: Floating a => Pen a Source #

A circular pen with unit radius.

pathToPen :: Floating a => ClosedPath a -> Pen a Source #

Create a pen from a path. For predictable results the path should be convex.

data Pen a Source #

Instances
(Floating a, Eq a) => AffineTransform (Pen a) a Source # 
Instance details

Defined in Geom2D.CubicBezier.Stroke

Methods

transform :: Transform a -> Pen a -> Pen a Source #

bezierOffset Source #

Arguments

:: 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