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.Region

Description

An efficient representation of sets of pixels.

Synopsis

- data Region
- emptyRegion :: Region
- rectangleRegion :: Point -> Point -> Region
- ellipseRegion :: Point -> Point -> Region
- polygonRegion :: [Point] -> Region
- intersectRegion :: Region -> Region -> Region
- unionRegion :: Region -> Region -> Region
- subtractRegion :: Region -> Region -> Region
- xorRegion :: Region -> Region -> Region
- regionToGraphic :: Region -> Graphic

# Documentation

data Region Source

emptyRegion :: Region Source

An empty region. This is not supported on Win32. It is possible to use an empty rectangle region instead.

rectangleRegion :: Point -> Point -> Region Source

A rectangular region, with the given points as opposite corners.

ellipseRegion :: Point -> Point -> Region Source

An elliptical region that fits in the rectangle with the given points as opposite corners.

polygonRegion :: [Point] -> Region Source

A polygonal region defined by a list of `Point`s.

intersectRegion :: Region -> Region -> Region Source

The intersection of two regions.

unionRegion :: Region -> Region -> Region Source

The union of two regions.

subtractRegion :: Region -> Region -> Region Source

The part of the first region that is not also in the second.

xorRegion :: Region -> Region -> Region Source

The symmetric difference of two regions.

regionToGraphic :: Region -> Graphic Source

Fill a `Region` using the current `Brush`.