HPDF-1.4.1: Generation of PDF documents

Portabilityportable
Stabilityexperimental
Maintainermisc@NOSPAMalpheccar.org

Graphics.PDF.Shapes

Contents

Description

PDF Shapes

Synopsis

Shapes

Paths

moveto :: Point -> Draw ()Source

Move pen to a given point without drawing anything

lineto :: Point -> Draw ()Source

Draw a line from current point to the one specified by lineto

arctoSource

Arguments

:: Angle

Extent of arc

-> Point

Center of arc

-> Draw () 

Approximate a circular arc by one cubic bezier curve. larger arc angles mean larger distortions

beginPath :: Point -> Draw ()Source

Begin a new path at a position

closePath :: Draw ()Source

Close current path

addBezierCubic :: Point -> Point -> Point -> Draw ()Source

Append a cubic Bezier curve to the current path. The curve extends from the current point to the point (x3 , y3), using (x1 , y1 ) and (x2, y2) as the Bezier control points

addPolygonToPath :: [Point] -> Draw ()Source

Add a polygon to current path

strokePath :: Draw ()Source

Draw current path

fillPath :: Draw ()Source

Fill current path

fillAndStrokePath :: Draw ()Source

Fill current path

fillPathEO :: Draw ()Source

Fill current path using even odd rule

fillAndStrokePathEO :: Draw ()Source

Fill current path using even odd rule

setAsClipPath :: Draw ()Source

Set clipping path

setAsClipPathEO :: Draw ()Source

Set clipping path

Usual shapes

newtype Polygon Source

Constructors

Polygon [Point] 

Instances

data Arc Source

Instances

Style

data CapStyle Source

Line cap styles

Constructors

ButtCap 
RoundCap 
SquareCap 

Instances

data JoinStyle Source

Line join styles

Constructors

MiterJoin 
RoundJoin 
BevelJoin 

setWidth :: MonadPath m => PDFFloat -> m ()Source

Set pen width

setLineCap :: MonadPath m => CapStyle -> m ()Source

Set line cap

setLineJoin :: MonadPath m => JoinStyle -> m ()Source

Set line join

setDash :: MonadPath m => DashPattern -> m ()Source

Set the dash pattern

setNoDash :: MonadPath m => m ()Source

No dash pattern

setMiterLimit :: MonadPath m => PDFFloat -> m ()Source

Set pen width