| Graphics Libraries (HGL package) | Source code | Contents | Index

Graphics.HGL.Draw.Pen

Portability | non-portable (requires concurrency)
Stability | provisional
Maintainer | libraries@haskell.org

Description

Pens, used for drawing lines.

Portability notes:

- On Win32, the pen is also used to draw a line round all the filled shapes --- so the pen color also affects how polygons, ellipses and regions are drawn.
- On Win32, the `Style` is ignored (i.e. treated as `Solid`) for pens of width greater than 1. This problem does not apply to X11.

Synopsis

data Pen

data Style

= Solid
| Dash
| Dot
| DashDot
| DashDotDot
| Null
| InsideFrame

createPen :: Style -> Int -> RGB -> IO Pen
deletePen :: Pen -> IO ()
selectPen :: Pen -> Draw Pen
mkPen :: Style -> Int -> RGB -> (Pen -> Draw a) -> Draw a

Documentation
data Pen

data Style

The style of line drawn by a pen.
Constructors

Solid |
Dash |
Dot |
DashDot |
DashDotDot |
Null |
InsideFrame |

createPen :: Style -> Int -> RGB -> IO Pen
Create a `Pen`.
deletePen :: Pen -> IO ()
Destroy a `Pen` created with `createPen`.
selectPen :: Pen -> Draw Pen
Set the `Pen` for subsequent drawing, returning the previous setting.
mkPen :: Style -> Int -> RGB -> (Pen -> Draw a) -> Draw a
Create a `Pen` locally to a drawing.
Produced by Haddock version 0.8