HPDF-1.4: Generation of PDF documentsSource codeContentsIndex
Graphics.PDF.Shapes
Portabilityportable
Stabilityexperimental
Maintainermisc@NOSPAMalpheccar.org
Contents
Shapes
Paths
Usual shapes
Style
Description
PDF Shapes
Synopsis
moveto :: Point -> Draw ()
lineto :: Point -> Draw ()
arcto :: Angle -> Point -> Draw ()
curveto :: Point -> Point -> Point -> Draw ()
beginPath :: Point -> Draw ()
closePath :: Draw ()
addBezierCubic :: Point -> Point -> Point -> Draw ()
addPolygonToPath :: [Point] -> Draw ()
addLineToPath :: Point -> 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 !Point !Point
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
= MiterJoin
| 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
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
arctoSource
:: AngleExtent of arc
-> PointCenter of arc
-> Draw ()
Approximate a circular arc by one cubic bezier curve. larger arc angles mean larger distortions
curveto :: Point -> Point -> Point -> Draw ()Source
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
addLineToPath :: Point -> Draw ()Source
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 whereSource
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
show/hide Instances
data Line Source
Constructors
Line PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
data Rectangle Source
Constructors
Rectangle !Point !Point
show/hide Instances
newtype Polygon Source
Constructors
Polygon [Point]
show/hide Instances
data Arc Source
Constructors
Arc PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
data Ellipse Source
Constructors
Ellipse PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
data Circle Source
Constructors
Circle PDFFloat PDFFloat PDFFloat
show/hide Instances
data RoundRectangle Source
Constructors
RoundRectangle PDFFloat PDFFloat PDFFloat PDFFloat PDFFloat PDFFloat
show/hide Instances
Style
data CapStyle Source
Line cap styles
Constructors
ButtCap
RoundCap
SquareCap
show/hide Instances
data JoinStyle Source
Line join styles
Constructors
MiterJoin
RoundJoin
BevelJoin
show/hide Instances
data DashPattern Source
Constructors
DashPattern ![PDFFloat] PDFFloat
show/hide Instances
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
Produced by Haddock version 2.3.0