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 () 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 # 
Shape Circle Source # 
Shape RoundRectangle Source # 
Shape Ellipse Source # 
Shape Arc Source # 
Shape Rectangle Source # 
Shape Line Source # 

data Arc Source #

Instances

Eq Arc Source # 

Methods

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

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

Shape Arc Source # 

Style

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