HPDF-1.6.2: Generation of PDF documents
Copyright(c) 2006-2016 alpheccar.org
LicenseBSD-style
Maintainermisc@NOSPAMalpheccar.org
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.PDF.Shapes

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

Instances details
Shape Arc Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Circle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Ellipse Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Line Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Polygon Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape Rectangle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Shape RoundRectangle Source # 
Instance details

Defined in Graphics.PDF.Shapes

data Line Source #

Instances

Instances details
Shape Line Source # 
Instance details

Defined in Graphics.PDF.Shapes

Eq Line Source # 
Instance details

Defined in Graphics.PDF.Shapes

Methods

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

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

data Rectangle Source #

Constructors

Rectangle !Point !Point 

Instances

Instances details
Shape Rectangle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Eq Rectangle Source # 
Instance details

Defined in Graphics.PDF.Shapes

newtype Polygon Source #

Constructors

Polygon [Point] 

Instances

Instances details
Shape Polygon Source # 
Instance details

Defined in Graphics.PDF.Shapes

data Arc Source #

Instances

Instances details
Shape Arc Source # 
Instance details

Defined in Graphics.PDF.Shapes

Eq Arc Source # 
Instance details

Defined in Graphics.PDF.Shapes

Methods

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

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

data Ellipse Source #

Instances

Instances details
Shape Ellipse Source # 
Instance details

Defined in Graphics.PDF.Shapes

Eq Ellipse Source # 
Instance details

Defined in Graphics.PDF.Shapes

Methods

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

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

data Circle Source #

Instances

Instances details
Shape Circle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Eq Circle Source # 
Instance details

Defined in Graphics.PDF.Shapes

Methods

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

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

Style

data CapStyle Source #

Line cap styles

Constructors

ButtCap 
RoundCap 
SquareCap 

data DashPattern Source #

Constructors

DashPattern ![PDFFloat] PDFFloat 

Instances

Instances details
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