PrintMap:
PROC [map: StandardColorMap] = {
IO.PutF[cmd.out, "colormap: 0x%x visualId: 0x%x\n", IO.card[Xl.ColorMapId[map.colormap]], IO.card[Xl.VisualId[map.visualId]]];
IO.PutF[cmd.out, " redMax: %g redMult: %g\n", IO.card[map.redMax], IO.card[map.redMult]];
IO.PutF[cmd.out, " greenMax: %g greenMult: %g\n", IO.card[map.greenMax], IO.card[map.greenMult]];
IO.PutF[cmd.out, " blueMax: %g blueMult: %g\n", IO.card[map.blueMax], IO.card[map.blueMult]];
IO.PutF[cmd.out, " basePixel: 0x%x killId: 0x%x\n -\n", IO.card[map.basePixel], IO.card[map.killId]];
};
GetPrintMaps:
PROC [r: Rope.
ROPE, mapKey: Xl.XAtom] = {
maps: LIST OF StandardColorMap;
IO.PutRope[cmd.out, r];
maps ¬ XlRGBColorMaps.GetRGBColorMaps[c: connection, w: Xl.DefaultRoot[connection], mapKey: mapKey];
IF maps=
NIL
THEN IO.PutRope[cmd.out, " none\n -\n"]
ELSE {
FOR l:
LIST
OF StandardColorMap ¬ maps, l.rest
WHILE l#
NIL
DO
PrintMap[l.first];
ENDLOOP;
};
};
GetPrintMaps["Default standard color maps:\n", XlPredefinedAtoms.rgbDefaultMap];