Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
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
- makeNewRegion :: Ptr Region -> IO Region
- newtype Region = Region (ForeignPtr Region)
- regionNew :: IO Region
- data FillRule
- regionPolygon :: [Point] -> FillRule -> IO Region
- regionCopy :: Region -> IO Region
- regionRectangle :: Rectangle -> IO Region
- regionGetClipbox :: Region -> IO Rectangle
- regionGetRectangles :: Region -> IO [Rectangle]
- regionEmpty :: Region -> IO Bool
- regionEqual :: Region -> Region -> IO Bool
- regionPointIn :: Region -> Point -> IO Bool
- data OverlapType
- regionRectIn :: Region -> Rectangle -> IO OverlapType
- regionOffset :: Region -> Int -> Int -> IO ()
- regionShrink :: Region -> Int -> Int -> IO ()
- regionUnionWithRect :: Region -> Rectangle -> IO ()
- regionIntersect :: Region -> Region -> IO ()
- regionUnion :: Region -> Region -> IO ()
- regionSubtract :: Region -> Region -> IO ()
- regionXor :: Region -> Region -> IO ()
Documentation
Specify how to interpret a polygon.
- The flag determines what happens if a polygon has overlapping areas.
Instances
Enum FillRule Source # | |
Defined in Graphics.UI.Gtk.Gdk.Region |
data OverlapType Source #
How a rectangle is contained in a Region
.
Instances
Enum OverlapType Source # | |
Defined in Graphics.UI.Gtk.Gdk.Region succ :: OverlapType -> OverlapType # pred :: OverlapType -> OverlapType # toEnum :: Int -> OverlapType # fromEnum :: OverlapType -> Int # enumFrom :: OverlapType -> [OverlapType] # enumFromThen :: OverlapType -> OverlapType -> [OverlapType] # enumFromTo :: OverlapType -> OverlapType -> [OverlapType] # enumFromThenTo :: OverlapType -> OverlapType -> OverlapType -> [OverlapType] # |
regionRectIn :: Region -> Rectangle -> IO OverlapType Source #
Check if a rectangle is within a region.
regionShrink :: Region -> Int -> Int -> IO () Source #
Move a region.
- Positive values shrink the region, negative values expand it.
regionUnionWithRect :: Region -> Rectangle -> IO () Source #
Updates the region to include the rectangle.
regionIntersect :: Region -> Region -> IO () Source #
Intersects one region with another.
- Changes
reg1
to include the common areas ofreg1
andreg2
.
regionUnion :: Region -> Region -> IO () Source #
Unions one region with another.
- Changes
reg1
to includereg1
andreg2
.