equal
deleted
inserted
replaced
19 |
19 |
20 ColorValue comment:' |
20 ColorValue comment:' |
21 COPYRIGHT (c) 1995 by Claus Gittinger |
21 COPYRIGHT (c) 1995 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libview2/ColorValue.st,v 1.1 1995-02-18 15:31:28 claus Exp $ |
24 $Header: /cvs/stx/stx/libview2/ColorValue.st,v 1.2 1995-03-07 21:54:53 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !ColorValue class methodsFor:'documentation'! |
27 !ColorValue class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
40 " |
40 " |
41 ! |
41 ! |
42 |
42 |
43 version |
43 version |
44 " |
44 " |
45 $Header: /cvs/stx/stx/libview2/ColorValue.st,v 1.1 1995-02-18 15:31:28 claus Exp $ |
45 $Header: /cvs/stx/stx/libview2/ColorValue.st,v 1.2 1995-03-07 21:54:53 claus Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
54 ! ! |
54 ! ! |
55 |
55 |
56 !ColorValue class methodsFor:'instance creation'! |
56 !ColorValue class methodsFor:'instance creation'! |
57 |
57 |
58 red:r green:g blue:b |
58 red:r green:g blue:b |
59 "return a color from red, green and blue values; |
59 "return a color from red, green and blue values. |
60 the arguments, r, g and b must be in the range (0..1)" |
60 The arguments, r, g and b must be in the range (0..1)" |
61 |
61 |
62 ^ Color red:r*100 green:g*100 blue:b*100 |
62 ^ Color red:r*100 green:g*100 blue:b*100 |
63 |
63 |
64 " |
64 " |
65 ColorValue red:0 green:1 blue:0 |
65 ColorValue red:0 green:1 blue:0 |
|
66 " |
|
67 ! |
|
68 |
|
69 brightness:grey |
|
70 "return a grey color. |
|
71 The grey value is given in 0..1 instead of percent" |
|
72 |
|
73 ^ Color grey:(grey * 100) |
|
74 |
|
75 " |
|
76 ColorValue brightness:0.5 |
66 " |
77 " |
67 ! |
78 ! |
68 |
79 |
69 scaledRed:r scaledGreen:g scaledBlue:b |
80 scaledRed:r scaledGreen:g scaledBlue:b |
70 "ST-80 compatibility. |
81 "ST-80 compatibility. |