ยค FixedColorDrawing

Fixed size drawings

Types

data FixedColorDrawing = FixCD Size [(GCId, [DrawCommand])]
instance Graphic FixedColorDrawing
instance Show FixedColorDrawing
instance PixmapGen FixedColorDrawing

Description

FixedColorDrawing is similar to FixedDrawing, but it allows you to mix different drawing attributes (colors, fonts, line width, etc) in one drawing. This can also be achieved by using a Drawing with leaves containing, e.g., FixedDrawings, but the advantage with FixedColorDrawing is that the size of the drawing can be obtained before computing what drawing attributes will be used. This means that computations for a certain part of a drawing can be delayed until that part becomes visible.

A disadvantage with FixedColorDrawing is the extra trouble of beforehand creating GCs for the drawing attributes to be used. This is probably most easily done with the functions wCreateGCtx adn gctx2gc.

See Also

Class Graphic.

Types FixedDrawing, FlexibleDrawing, Drawing, DrawCommand.

Creating GCs: wCreateGCtx, gctx2gc.

Bugs

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.