|
From: | Carl Scheffler |
Subject: | Colormap |
Date: | Sun, 21 Nov 1999 22:16:29 +0200 |
Hi
I'm having some trouble to use all 256 colours in the Colormap
class. In the following piece of code, I get an error on line 08 that a call was
made to setColor: ToName: and that colour #255 is set twice. If I change line 02
to for(i=0; i < 255; i++), everything is fine. Why does
ZoomRaster setColormap: make a call to Colormap setColor: ToName: ?
01 landColor=[Colormap create:
self];
02 for(i=0; i < 256; i++) 03 [landColor setColor: i ToRed: i/255.0 Green: i/255.0 Blue: i/255.0]; 04 05 landRaster=[ZoomRaster createBegin:
self];
06 SET_WINDOW_GEOMETRY_RECORD_NAME(landRaster); 07 landRaster=[landRaster createEnd]; 08 [landRaster setColormap: landColor]; 09 [landRaster setZoomFactor: zoom]; 10 [landRaster setWidth: size Height: size]; 11 [landRaster setWindowTitle: "Terrain"]; 12 [landRaster enableDestroyNotification: self 13 notificationMethod: @selector(_landRasterDeath:)]; 14 [landRaster setButton: ButtonLeft 15 Client: self 16 Message: M(_switchLandOn)]; 17 [landRaster pack]; Carl Scheffler
address@hidden
"Beware the fury of the patient man..." |
[Prev in Thread] | Current Thread | [Next in Thread] |