Name

GC —

Graphics contexts.

Synopsis

data
        GCValues
gcNew:: DrawableClass d => d -> IO GC
gcNewWithValues:: DrawableClass d => d -> GCValues -> IO GC
newGCValues:: GCValues
gcGetValues:: GC -> IO GCValues
gcSetClipRectangle:: GC -> Rectangle -> IO ()
gcSetClipRegion:: GC -> Region -> IO ()
gcSetDashes:: GC -> Int -> [(Int,Int)] -> IO ()
gcSetValues:: GC -> GCValues -> IO ()

Introduction

This module supplies graphics contexts (GCs) which are a convenient way to pass attributes to drawing functions.

Datatypes

data GCValues

Intermediate data structure for GCs.

data GCValues =GCValues ColorColorFunctionFillMaybe PixmapMaybe PixmapMaybe PixmapSubwindowModeIntIntIntIntBoolIntLineStyleCapStyleJoinStyle

If graphicsExposure is set then copying portions into a drawable will generate an exposure event, even if the destination area is not currently visible. Intermediate data structure for GCs.

If graphicsExposure is set then copying portions into a drawable will generate an exposure event, even if the destination area is not currently visible.

Constructors

gcNew

Create an empty graphics context.

gcNew:: d:: IO GC
d

gcNewWithValues

Creates a graphics context with specific values.

gcNewWithValues:: d:: GCValues:: IO GC
dgcv

Methods

gcGetValues

Retrieve the values in a graphics context.

gcGetValues:: GC:: IO GCValues
gc

gcSetClipRectangle

Set a clipping rectangle.

gcSetClipRectangle:: GC:: Rectangle:: IO ()
gcr

All drawing operations are restricted to this rectangle. This rectangle is interpreted relative to the clip origin.

gcSetClipRegion

Set a clipping region.

gcSetClipRegion:: GC:: Region:: IO ()

All drawing operations are restricted to this region. This region is interpreted relative to the clip origin.

gcSetDashes

Specify the pattern with which lines are drawn.

gcSetDashes:: GC:: Int:: [(Int,Int)]:: IO ()
gcphaseonOffList

Every tuple in the list contains an even and an odd segment. Even segments are drawn normally, whereby the lineStyle member of the graphics context defines if odd segements are drawn or not. A phase argument greater than 0 will drop phase pixels before starting to draw.

gcSetValues

Change some of the values of a graphics context.

gcSetValues:: GC:: GCValues:: IO ()
gcgcv

Constants

newGCValues

An empty record of GCValues.

newGCValues

Use this value instead of the constructor to avoid compiler wanings about uninitialized fields.