Graphics.PS.Path

Description

Path type and functions.

Synopsis

# Documentation

data Path Source #

Path data type,in cartesian space.

Constructors

 MoveTo (Pt Double) LineTo (Pt Double) CurveTo (Pt Double) (Pt Double) (Pt Double) ClosePath (Pt Double) Text Font [Glyph] PTransform (Matrix Double) Path Join Path Path

Instances

 Source # Methods(==) :: Path -> Path -> Bool #(/=) :: Path -> Path -> Bool # Source # MethodsshowsPrec :: Int -> Path -> ShowS #show :: Path -> String #showList :: [Path] -> ShowS # Source # Methodsmappend :: Path -> Path -> Path #mconcat :: [Path] -> Path # Source # Methodsmtransform :: Matrix Double -> Path -> Path Source #

(+++) :: Path -> Path -> Path Source #

Infix notation for Join.

combine :: [Path] -> Path Source #

Left fold of Join.

line :: [Pt Double] -> Path Source #

Line segments though list of Pt.

polygon :: [Pt Double] -> Path Source #

Variant of line connecting the last Pt to the first.

rectangle :: Pt Double -> Double -> Double -> Path Source #

Rectangle with lower left at Pt and of specified width and height. Polygon is ordered anticlockwise from lower left.

type Arc_Seg n = (Pt n, Pt n, Pt n, Pt n) Source #

An arc segment, as starting point and values for the curveto operator.

data Arc n Source #

An arc, given as either one or two segments.

Constructors

 Arc1 (Arc_Seg n) Arc2 (Arc_Seg n) (Arc_Seg n)

arcp :: Pt Double -> Double -> Double -> Double -> Arc_Seg Double Source #

Arc segment, (x,y) = center,r = radius,a = start angle,b = end angle.

arca :: Pt Double -> Double -> Double -> Double -> Arc Double Source #

Arc, c = center,r = radius,a = start angle,b = end angle

If the arc angle is greater than pi the arc must be drawn in two segments.

Path of Arc.

arca_udir :: Pt Double -> Double -> Double -> Double -> Arc Double Source #

Variant of arca allowing b to be less than a.

arca_udir with a and b reversed.

arc :: Pt Double -> Double -> Double -> Double -> Path Source #

Arc given by a central point,a radius,and start and end angles.

arcNegative :: Pt Double -> Double -> Double -> Double -> Path Source #

Negative arc.

type Annular n = (Pt n, Pt n, Arc n, Pt n, Arc n) Source #

annular_f :: Pt Double -> Double -> Double -> Double -> Double -> Annular Double Source #

(x,y) = center,ir = inner radius,xr = outer radius,sa = start angle,a = angle,ea = end angle

annular :: Pt Double -> Double -> Double -> Double -> Double -> Path Source #

Annular segment.

flatten_f :: Matrix Double -> Path -> Path Source #

Apply any transformations at path. The resulting path will not have any PTransform nodes.

renderLines :: [Ln Double] -> Path Source #

Render each (p1,p2) as a distinct line.

renderLines_jn :: [Ln Double] -> Path Source #

Collapse line sequences into a single line.