equal
deleted
inserted
replaced
19 |
19 |
20 Depth4Image comment:' |
20 Depth4Image comment:' |
21 COPYRIGHT (c) 1993 by Claus Gittinger |
21 COPYRIGHT (c) 1993 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libview/Depth4Image.st,v 1.11 1995-03-18 05:10:32 claus Exp $ |
24 $Header: /cvs/stx/stx/libview/Depth4Image.st,v 1.12 1995-10-24 17:08:30 cg Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !Depth4Image class methodsFor:'documentation'! |
27 !Depth4Image 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/libview/Depth4Image.st,v 1.11 1995-03-18 05:10:32 claus Exp $ |
45 $Header: /cvs/stx/stx/libview/Depth4Image.st,v 1.12 1995-10-24 17:08:30 cg Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
59 |
59 |
60 imageDepth |
60 imageDepth |
61 ^ 4 |
61 ^ 4 |
62 ! ! |
62 ! ! |
63 |
63 |
64 !Depth4Image methodsFor:'queries'! |
64 !Depth4Image ignoredMethodsFor:'queries'! |
65 |
|
66 bitsPerPixel |
|
67 "return the number of bits per pixel" |
|
68 |
|
69 ^ 4 |
|
70 ! |
|
71 |
|
72 bitsPerRow |
|
73 "return the number of bits in one scanline of the image" |
|
74 |
|
75 ^ width * 4 |
|
76 ! |
|
77 |
65 |
78 bitsPerSample |
66 bitsPerSample |
79 "return the number of bits per sample. |
67 "return the number of bits per sample. |
80 The return value is an array of bits-per-plane." |
68 The return value is an array of bits-per-plane." |
81 |
69 |
82 ^ #(4) |
70 ^ #(4) |
83 ! |
71 ! |
84 |
72 |
|
73 samplesPerPixel |
|
74 "return the number of samples per pixel in the image." |
|
75 |
|
76 ^ 1 |
|
77 ! ! |
|
78 |
|
79 !Depth4Image methodsFor:'queries'! |
|
80 |
|
81 bitsPerPixel |
|
82 "return the number of bits per pixel" |
|
83 |
|
84 ^ 4 |
|
85 ! |
|
86 |
|
87 bitsPerRow |
|
88 "return the number of bits in one scanline of the image" |
|
89 |
|
90 ^ width * 4 |
|
91 ! |
|
92 |
85 bytesPerRow |
93 bytesPerRow |
86 "return the number of bytes in one scanline of the image" |
94 "return the number of bytes in one scanline of the image" |
87 |
95 |
88 |nbytes| |
96 |nbytes| |
89 |
97 |
90 nbytes := width // 2. |
98 nbytes := width // 2. |
91 width odd ifTrue:[ |
99 width odd ifTrue:[ |
92 ^ nbytes + 1 |
100 ^ nbytes + 1 |
93 ]. |
101 ]. |
94 ^ nbytes |
102 ^ nbytes |
95 ! |
|
96 |
|
97 samplesPerPixel |
|
98 "return the number of samples per pixel in the image." |
|
99 |
|
100 ^ 1 |
|
101 ! |
103 ! |
102 |
104 |
103 usedValues |
105 usedValues |
104 "return a collection of color values used in the receiver." |
106 "return a collection of color values used in the receiver." |
105 |
107 |