gtk-0.14.5: Binding to the Gtk+ graphical user interface library.

Maintainer gtk2hs-users@lists.sourceforge.net provisional portable (depends on GHC) None Haskell98

Graphics.UI.Gtk.Gdk.Region

Description

A set of rectangles describing areas to be redrawn.

• Regions consist of a set of non-overlapping rectangles. They are used to specify the area of a window which needs updating.

This module is empty when built with Gtk3 because Pixmap has been removed.

Synopsis

# Documentation

newtype Region Source #

Constructors

 Region (ForeignPtr Region)

Instances

 Source # MethodsshowsPrec :: Int -> Region -> ShowS #showList :: [Region] -> ShowS #

Create an empty region.

data FillRule Source #

Specify how to interpret a polygon.

• The flag determines what happens if a polygon has overlapping areas.

Constructors

 EvenOddRule WindingRule

Instances

 Source # MethodsenumFrom :: FillRule -> [FillRule] #enumFromTo :: FillRule -> FillRule -> [FillRule] #

Convert a polygon into a Region.

Copy a Region.

Convert a rectangle to a Region.

Smallest rectangle including the Region.

Turn the Region into its rectangles.

A Region is a set of horizontal bands. Each band consists of one or more rectangles of the same height. No rectangles in a band touch.

Test if a Region is empty.

Compares two Regions for equality.

Checks if a point it is within a region.

How a rectangle is contained in a Region.

Instances

 Source # Methods

Check if a rectangle is within a region.

regionOffset :: Region -> Int -> Int -> IO () Source #

Move a region.

regionShrink :: Region -> Int -> Int -> IO () Source #

Move a region.

• Positive values shrink the region, negative values expand it.

Updates the region to include the rectangle.

Intersects one region with another.

• Changes reg1 to include the common areas of reg1 and reg2.

regionUnion :: Region -> Region -> IO () Source #

Unions one region with another.

• Changes reg1 to include reg1 and reg2.

Removes pars of a Region.

• Reduces the region reg1 so that is does not include any areas of reg2.

regionXor :: Region -> Region -> IO () Source #

XORs two Regions.

• The exclusive or of two regions contains all areas which were not overlapping. In other words, it is the union of the regions minus their intersections.