HPDF-1.5.0: 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 () 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

arcto Source #

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

class Shape a where Source #

Minimal complete definition

addShape

Methods

addShape :: a -> Draw () Source #

stroke :: a -> Draw () Source #

fill :: a -> Draw () Source #

fillAndStroke :: a -> Draw () Source #

fillEO :: a -> Draw () Source #

fillAndStrokeEO :: a -> Draw () Source #

Instances
Shape Polygon Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Circle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape RoundRectangle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Ellipse Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Arc Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Rectangle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Line Source # 
Instance details

Defined in Graphics.PDF.Shapes

data Line Source #

Instances
Eq Line Source # 
Instance details

Defined in Graphics.PDF.Shapes

Methods

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

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

Shape Line Source # 
Instance details

Defined in Graphics.PDF.Shapes

newtype Polygon Source #

Constructors

Polygon [Point] 

data Arc Source #

Instances
Eq Arc Source # 
Instance details

Defined in Graphics.PDF.Shapes

Methods

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

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

Shape Arc Source # 
Instance details

Defined in Graphics.PDF.Shapes

data Circle Source #

Instances
Eq Circle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Methods

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

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

Shape Circle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Style

data DashPattern Source #

Constructors

DashPattern ![PDFFloat] PDFFloat 
Instances
Eq DashPattern Source # 
Instance details

Defined in Graphics.PDF.Shapes

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