HPDF-1.3: Generation of PDF documentsContentsIndex
Graphics.PDF.Shapes
Portabilityportable
Stabilityexperimental
Maintainermisc@NOSPAMalpheccar.org
Contents
Shapes
Types
Lines
Paths
Usual shapes
Style
Description
PDF Shapes
Synopsis
type Point = (PDFFloat, PDFFloat)
moveto :: PDFFloat -> PDFFloat -> Draw ()
lineto :: PDFFloat -> PDFFloat -> Draw ()
beginPath :: PDFFloat -> PDFFloat -> Draw ()
closePath :: Draw ()
addBezierCubic :: PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> PDFFloat -> Draw ()
addPolygonToPath :: [Point] -> Draw ()
addLineToPath :: PDFFloat -> PDFFloat -> Draw ()
strokePath :: Draw ()
fillPath :: Draw ()
fillAndStrokePath :: Draw ()
fillPathEO :: Draw ()
fillAndStrokePathEO :: Draw ()
setAsClipPath :: Draw ()
setAsClipPathEO :: Draw ()
class Shape a where
addShape :: a -> Draw ()
stroke :: a -> Draw ()
fill :: a -> Draw ()
fillAndStroke :: a -> Draw ()
fillEO :: a -> Draw ()
fillAndStrokeEO :: a -> Draw ()
data Line = Line PDFFloat PDFFloat PDFFloat PDFFloat
data Rectangle = Rectangle PDFFloat PDFFloat PDFFloat PDFFloat
newtype Polygon = Polygon [Point]
data Arc = Arc PDFFloat PDFFloat PDFFloat PDFFloat
data Ellipse = Ellipse PDFFloat PDFFloat PDFFloat PDFFloat
data Circle = Circle PDFFloat PDFFloat PDFFloat
data RoundRectangle = RoundRectangle PDFFloat PDFFloat PDFFloat PDFFloat PDFFloat PDFFloat
data CapStyle
= ButtCap
| RoundCap
| SquareCap
data JoinStyle
= MilterJoin
| RoundJoin
| BevelJoin
data DashPattern = DashPattern ![PDFFloat] PDFFloat
setWidth :: MonadPath m => PDFFloat -> m ()
setLineCap :: MonadPath m => CapStyle -> m ()
setLineJoin :: MonadPath m => JoinStyle -> m ()
setDash :: MonadPath m => DashPattern -> m ()
setNoDash :: MonadPath m => m ()
setMiterLimit :: MonadPath m => PDFFloat -> m ()
Shapes
Types
type Point = (PDFFloat, PDFFloat)
A point
Lines
moveto
:: PDFFloatHorizontal coordinate
-> PDFFloatVertical coordinate
-> Draw ()
Move pen to a given point without drawing anything
lineto
:: PDFFloatHorizontal coordinate
-> PDFFloatVertical coordinate
-> Draw ()
Draw a line from current point to the one specified by lineto
Paths
beginPath
:: PDFFloatHorizontal coordinate
-> PDFFloatVertical coordinate
-> Draw ()
Begin a new path at position x y
closePath :: Draw ()
Close current path
addBezierCubic
:: PDFFloatx1
-> PDFFloaty1
-> PDFFloatx2
-> PDFFloaty2
-> PDFFloatx3
-> PDFFloaty3
-> 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
addLineToPath
:: PDFFloatHorizontal coordinate
-> PDFFloatVertical coordinate
-> Draw ()
Add a line from current point to the one specified by lineto
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
Methods
addShape :: a -> Draw ()
stroke :: a -> Draw ()
fill :: a -> Draw ()
fillAndStroke :: a -> Draw ()
fillEO :: a -> Draw ()
fillAndStrokeEO :: a -> Draw ()
show/hide Instances
data Line
Constructors
Line PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
data Rectangle
Constructors
Rectangle PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
newtype Polygon
Constructors
Polygon [Point]
show/hide Instances
data Arc
Constructors
Arc PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
data Ellipse
Constructors
Ellipse PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
data Circle
Constructors
Circle PDFFloat PDFFloat PDFFloat
show/hide Instances
data RoundRectangle
Constructors
RoundRectangle PDFFloat PDFFloat PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
Style
data CapStyle
Line cap styles
Constructors
ButtCap
RoundCap
SquareCap
show/hide Instances
data JoinStyle
Line join styles
Constructors
MilterJoin
RoundJoin
BevelJoin
show/hide Instances
data DashPattern
Constructors
DashPattern ![PDFFloat] PDFFloat
show/hide Instances
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
Produced by Haddock version 0.8