wCreateGCtx :: (FudgetIO f, ColorGen a2, Show a2, Show a1, FontGen a1) => GCtx -> [GCAttributes a2 a1] -> (GCtx -> f i o) -> f i o pmCreateGCtx :: (FudgetIO f, ColorGen a2, Show a2, Show a1, FontGen a1) => PixmapId -> GCtx -> [GCAttributes a2 a1] -> (GCtx -> f i o) -> f i o data GCtx = GC GCId FontData instance Show GCtx rootGCtx :: GCtx createGCtx :: (FontGen a1, Show a1, Show a2, ColorGen a2, FudgetIO f) => Drawable -> GCtx -> [GCAttributes a2 a1] -> (GCtx -> f i o) -> f i o gcFgA :: c -> [GCAttributes c FontSpec] gcBgA :: c -> [GCAttributes c FontSpec] gcFontA :: f -> [GCAttributes ColorSpec f] gctx2gc :: GCtx -> GCId
wCreateGCtx templgc gcattrs
Values of type
GCtx contain a GCId and the FontStruct of
the font used by the GC.
GCtxs are used by the rendering system for Drawings. For
efficiency, rather than embedding drawing attributes (e.g., color and font
names) in drawings, an appropriate
GCtx can be created in advance
and included in the drawing.
wCreateGCtx creates a new
GCtx by modifying a template
rootGCtx can be used as a template, but should not be used for any
Since GCattributes is parameterized over the types of colors and fonts
wCreateGCtx is overloaded in these types, you get ambiguous
overloadings for gc attribute lists that don't specify both a color and a
font. The general way out of this is to use a type restriction to specify
a type for the missing attributes. A convenient solution for some common
cases is provided by the functions
templgc :: GCtx
gcattrs :: [GCAttributes a2 a1]
GCtxto be created should differ from the template. If you don't specify both a color and a font, you will get an ambiguous overloading (see above).
Data type for composite graphics: Drawing.
This page documents work progress. Information on this page is subject to change without notice and does not represent a commitment on the part of the Fudgets corporation.