data FixedColorDrawing = FixCD Size [(GCId, [DrawCommand])] instance Graphic FixedColorDrawing instance Show FixedColorDrawing instance PixmapGen FixedColorDrawing
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.
Types FixedDrawing, FlexibleDrawing, Drawing, DrawCommand.
Creating GCs: wCreateGCtx, gctx2gc.