equal
deleted
inserted
replaced
1320 ^ here scaledRed:(redFraction * MaxValue) rounded |
1320 ^ here scaledRed:(redFraction * MaxValue) rounded |
1321 scaledGreen:(greenFraction * MaxValue) rounded |
1321 scaledGreen:(greenFraction * MaxValue) rounded |
1322 scaledBlue:(blueFraction * MaxValue) rounded |
1322 scaledBlue:(blueFraction * MaxValue) rounded |
1323 ! |
1323 ! |
1324 |
1324 |
|
1325 r:r g:g b:b range:componentMax |
|
1326 "return a color from red, green and blue values; |
|
1327 the arguments, r, g and b are interpreted as values (0..componentMax)" |
|
1328 |
|
1329 ^ here scaledRed:(r * MaxValue // componentMax) |
|
1330 scaledGreen:(g * MaxValue // componentMax) |
|
1331 scaledBlue:(b * MaxValue // componentMax) |
|
1332 |
|
1333 " |
|
1334 (Color r:1023 g:0 b:0 range:1023) inspect |
|
1335 (Color r:1023 g:1023 b:1023 range:1023) inspect |
|
1336 (Color r:0 g:0 b:0 range:1023) inspect |
|
1337 " |
|
1338 ! |
|
1339 |
1325 showColors: colorList |
1340 showColors: colorList |
1326 "Display the given collection of colors across the top of the Display." |
1341 "Display the given collection of colors across the top of the Display." |
1327 |
1342 |
1328 | w r | |
1343 | w r | |
1329 w _ Display width // colorList size. |
1344 w _ Display width // colorList size. |
5285 ! ! |
5300 ! ! |
5286 |
5301 |
5287 !Color class methodsFor:'documentation'! |
5302 !Color class methodsFor:'documentation'! |
5288 |
5303 |
5289 version |
5304 version |
5290 ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.189 2004-06-07 09:22:24 cg Exp $' |
5305 ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.190 2004-07-14 17:16:27 cg Exp $' |
5291 ! ! |
5306 ! ! |
5292 |
5307 |
5293 Color initialize! |
5308 Color initialize! |