curves-1.1.0.1: Library for drawing curve based images.

Safe HaskellNone

Graphics.Curves.SVG.Path

Synopsis

Documentation

type Path = [PathCmd]Source

A path is a sequence of path commands.

data CoordType Source

Path commands can use absolute or relative coordinates.

Constructors

Absolute 
Relative 

Instances

data PathCmd Source

The path commands specified by http://www.w3.org/TR/SVG/paths.html#PathData.

Constructors

MoveTo CoordType Point 
LineTo CoordType Point 
HorLineTo CoordType Scalar 
VerLineTo CoordType Scalar 
BezierTo CoordType [Point]

number of points = degree of the Bézier curve

SmoothBezierTo CoordType [Point]

first control point is the mirror of the previous control point

ArcTo CoordType Vec Scalar Bool Bool Point 
ClosePath 

Instances

parsePath :: String -> PathSource

Read a path string.

drawPath :: Path -> ImageSource

Render a path.