HGL- A simple graphics library based on X11 or Win32

Copyright(c) Alastair Reid, 1999-2003
LicenseBSD-style (see the file libraries/base/LICENSE)
Portabilitynon-portable (requires concurrency)
Safe HaskellNone



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.



data Pen Source

data Style Source

The style of line drawn by a pen.

createPen :: Style -> Int -> RGB -> IO Pen Source

Create a Pen.

deletePen :: Pen -> IO () Source

Destroy a Pen created with createPen.

selectPen :: Pen -> Draw Pen Source

Set the Pen for subsequent drawing, returning the previous setting.

mkPen :: Style -> Int -> RGB -> (Pen -> Draw a) -> Draw a Source

Create a Pen locally to a drawing.