HPDF-1.4.10: Generation of PDF documents

Copyright(c) 2006-2016 alpheccar.org
LicenseBSD-style
Maintainermisc@NOSPAMalpheccar.org
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Graphics.PDF.Shapes

Contents

Description

PDF Shapes

Synopsis

Shapes

Paths

moveto :: Point -> Draw () #

Move pen to a given point without drawing anything

lineto :: Point -> Draw () #

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

arcto #

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

curveto :: Point -> Point -> Point -> Draw () #

beginPath :: Point -> Draw () #

Begin a new path at a position

closePath :: Draw () #

Close current path

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

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 () #

Add a polygon to current path

strokePath :: Draw () #

Draw current path

fillPath :: Draw () #

Fill current path

fillAndStrokePath :: Draw () #

Fill current path

fillPathEO :: Draw () #

Fill current path using even odd rule

fillAndStrokePathEO :: Draw () #

Fill current path using even odd rule

setAsClipPath :: Draw () #

Set clipping path

setAsClipPathEO :: Draw () #

Set clipping path

Usual shapes

class Shape a where #

Minimal complete definition

addShape

Methods

addShape :: a -> Draw () #

stroke :: a -> Draw () #

fill :: a -> Draw () #

fillAndStroke :: a -> Draw () #

fillEO :: a -> Draw () #

fillAndStrokeEO :: a -> Draw () #

Instances

Shape Polygon # 
Shape Circle # 

Methods

addShape :: Circle -> Draw () #

stroke :: Circle -> Draw () #

fill :: Circle -> Draw () #

fillAndStroke :: Circle -> Draw () #

fillEO :: Circle -> Draw () #

fillAndStrokeEO :: Circle -> Draw () #

Shape RoundRectangle # 
Shape Ellipse # 
Shape Arc # 

Methods

addShape :: Arc -> Draw () #

stroke :: Arc -> Draw () #

fill :: Arc -> Draw () #

fillAndStroke :: Arc -> Draw () #

fillEO :: Arc -> Draw () #

fillAndStrokeEO :: Arc -> Draw () #

Shape Rectangle # 
Shape Line # 

Methods

addShape :: Line -> Draw () #

stroke :: Line -> Draw () #

fill :: Line -> Draw () #

fillAndStroke :: Line -> Draw () #

fillEO :: Line -> Draw () #

fillAndStrokeEO :: Line -> Draw () #

data Line #

Instances

Eq Line # 

Methods

(==) :: Line -> Line -> Bool #

(/=) :: Line -> Line -> Bool #

Shape Line # 

Methods

addShape :: Line -> Draw () #

stroke :: Line -> Draw () #

fill :: Line -> Draw () #

fillAndStroke :: Line -> Draw () #

fillEO :: Line -> Draw () #

fillAndStrokeEO :: Line -> Draw () #

newtype Polygon #

Constructors

Polygon [Point] 

Instances

data Arc #

Instances

Eq Arc # 

Methods

(==) :: Arc -> Arc -> Bool #

(/=) :: Arc -> Arc -> Bool #

Shape Arc # 

Methods

addShape :: Arc -> Draw () #

stroke :: Arc -> Draw () #

fill :: Arc -> Draw () #

fillAndStroke :: Arc -> Draw () #

fillEO :: Arc -> Draw () #

fillAndStrokeEO :: Arc -> Draw () #

data Circle #

Instances

Eq Circle # 

Methods

(==) :: Circle -> Circle -> Bool #

(/=) :: Circle -> Circle -> Bool #

Shape Circle # 

Methods

addShape :: Circle -> Draw () #

stroke :: Circle -> Draw () #

fill :: Circle -> Draw () #

fillAndStroke :: Circle -> Draw () #

fillEO :: Circle -> Draw () #

fillAndStrokeEO :: Circle -> Draw () #

Style

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

Set pen width

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

Set line cap

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

Set line join

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

Set the dash pattern

setNoDash :: MonadPath m => m () #

No dash pattern

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

Set pen width