HGL-3.2.0.2: A simple graphics library based on X11 or Win32

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

Graphics.HGL.Draw.Picture

Description

Drawing various shapes.

Synopsis

- arc :: Point -> Point -> Angle -> Angle -> Graphic
- ellipse :: Point -> Point -> Graphic
- shearEllipse :: Point -> Point -> Point -> Graphic
- line :: Point -> Point -> Graphic
- polyline :: [Point] -> Graphic
- polygon :: [Point] -> Graphic
- polyBezier :: [Point] -> Graphic

# Documentation

arc Source

Arguments

:: Point | a corner of the rectangle bounding the ellipse.
-> Point | the opposite corner of the rectangle bounding the ellipse.
-> Angle | the start angle of the arc, measured counter-clockwise from the horizontal.
-> Angle | the extent of the arc, measured counter-clockwise from the start angle.
-> Graphic | a filled shape

A filled arc from an ellipse.

ellipse Source

Arguments

:: Point | a corner of the rectangle bounding the ellipse.
-> Point | the opposite corner of the rectangle bounding the ellipse.
-> Graphic | a filled shape

A filled ellipse that fits inside a rectangle defined by two `Point`s on the window.

shearEllipse Source

Arguments

:: Point | a corner of the bounding parallelogram.
-> Point | another corner of the parallelogram, adjacent to the first.
-> Point | another corner of the parallelogram, adjacent to the first and thus opposite to the second.
-> Graphic | a filled shape

A filled sheared ellipse that fits inside a parallelogram defined by three `Point`s on the window. This function is implemented using polygons on both Win32 and X11.

line :: Point -> Point -> Graphic Source

A line between two `Point`s.

polyline :: [Point] -> Graphic Source

A series of lines through a list of `Point`s.

polygon :: [Point] -> Graphic Source

A filled polygon defined by a list of `Point`s.

polyBezier :: [Point] -> Graphic Source

A series of (unfilled) Bezier curves defined by a list of 3n+1 control `Point`s. This function is not supported on X11 (it yields an error message and a `polyline`).