|
Graphics.PDF.Shapes | Portability | portable | Stability | experimental | Maintainer | misc@NOSPAMalpheccar.org |
|
|
|
|
|
Description |
PDF Shapes
|
|
Synopsis |
|
|
|
|
Shapes
|
|
Types
|
|
type Point = (PDFFloat, PDFFloat) |
A point
|
|
Lines
|
|
moveto |
:: PDFFloat | Horizontal coordinate
| -> PDFFloat | Vertical coordinate
| -> Draw () | | Move pen to a given point without drawing anything
|
|
|
lineto |
:: PDFFloat | Horizontal coordinate
| -> PDFFloat | Vertical coordinate
| -> Draw () | | Draw a line from current point to the one specified by lineto
|
|
|
Paths
|
|
beginPath |
:: PDFFloat | Horizontal coordinate
| -> PDFFloat | Vertical coordinate
| -> Draw () | | Begin a new path at position x y
|
|
|
closePath :: Draw () |
Close current path
|
|
addBezierCubic |
:: PDFFloat | x1
| -> PDFFloat | y1
| -> PDFFloat | x2
| -> PDFFloat | y2
| -> PDFFloat | x3
| -> PDFFloat | y3
| -> 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 |
:: PDFFloat | Horizontal coordinate
| -> PDFFloat | Vertical 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 () |
| | Instances | |
|
|
data Line |
Constructors | | Instances | |
|
|
data Rectangle |
Constructors | | Instances | |
|
|
newtype Polygon |
Constructors | | Instances | |
|
|
data Arc |
Constructors | | Instances | |
|
|
data Ellipse |
Constructors | | Instances | |
|
|
data Circle |
Constructors | | Instances | |
|
|
data RoundRectangle |
Constructors | | Instances | |
|
|
Style
|
|
data CapStyle |
Line cap styles
| Constructors | | Instances | |
|
|
data JoinStyle |
Line join styles
| Constructors | MilterJoin | | RoundJoin | | BevelJoin | |
| Instances | |
|
|
data DashPattern |
Constructors | | 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 |