equal
deleted
inserted
replaced
|
1 "{ Encoding: utf8 }" |
|
2 |
1 " |
3 " |
2 COPYRIGHT (c) 2009 by eXept Software AG |
4 COPYRIGHT (c) 2009 by eXept Software AG |
3 All Rights Reserved |
5 All Rights Reserved |
4 |
6 |
5 This software is furnished under a license and may be used |
7 This software is furnished under a license and may be used |
8 be provided or otherwise made available to, or used by, any |
10 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
11 other person. No title to or ownership of the software is |
10 hereby transferred. |
12 hereby transferred. |
11 " |
13 " |
12 "{ Package: 'stx:libview' }" |
14 "{ Package: 'stx:libview' }" |
|
15 |
|
16 "{ NameSpace: Smalltalk }" |
13 |
17 |
14 Image subclass:#Depth64Image |
18 Image subclass:#Depth64Image |
15 instanceVariableNames:'' |
19 instanceVariableNames:'' |
16 classVariableNames:'' |
20 classVariableNames:'' |
17 poolDictionaries:'' |
21 poolDictionaries:'' |
76 |
80 |
77 pixelFunction notNil ifTrue:[^ pixelFunction value:x value:y]. |
81 pixelFunction notNil ifTrue:[^ pixelFunction value:x value:y]. |
78 |
82 |
79 pixelIndex := (width * 8 * y) + 1 + (x * 8). |
83 pixelIndex := (width * 8 * y) + 1 + (x * 8). |
80 |
84 |
81 ^ ((bytes wordAt:pixelIndex MSB:true) bitShift:48) |
85 ^ ((bytes unsignedInt16At:pixelIndex MSB:true) bitShift:48) |
82 + ((bytes wordAt:pixelIndex+2 MSB:true) bitShift:32) |
86 + ((bytes unsignedInt16At:pixelIndex+2 MSB:true) bitShift:32) |
83 + ((bytes wordAt:pixelIndex+4 MSB:true) bitShift:16) |
87 + ((bytes unsignedInt16At:pixelIndex+4 MSB:true) bitShift:16) |
84 + (bytes wordAt:pixelIndex+6 MSB:true). |
88 + (bytes wordAt:pixelIndex+6 MSB:true). |
85 ! |
89 ! |
86 |
90 |
87 pixelAtX:x y:y put:aPixelValue |
91 pixelAtX:x y:y put:aPixelValue |
88 "set the pixel at x/y to aPixelValue. |
92 "set the pixel at x/y to aPixelValue. |
93 |
97 |
94 pixelIndex := (width * 8 * y) + 1 + (x * 8). |
98 pixelIndex := (width * 8 * y) + 1 + (x * 8). |
95 bytes isNil ifTrue:[ |
99 bytes isNil ifTrue:[ |
96 self createPixelStore |
100 self createPixelStore |
97 ]. |
101 ]. |
98 bytes wordAt:pixelIndex put:((aPixelValue bitShift:-48) bitAnd:16rFFFF) MSB:true. |
102 bytes unsignedInt16At:pixelIndex put:((aPixelValue bitShift:-48) bitAnd:16rFFFF) MSB:true. |
99 bytes wordAt:pixelIndex+2 put:((aPixelValue bitShift:-32) bitAnd:16rFFFF) MSB:true. |
103 bytes unsignedInt16At:pixelIndex+2 put:((aPixelValue bitShift:-32) bitAnd:16rFFFF) MSB:true. |
100 bytes wordAt:pixelIndex+4 put:((aPixelValue bitShift:-16) bitAnd:16rFFFF) MSB:true. |
104 bytes unsignedInt16At:pixelIndex+4 put:((aPixelValue bitShift:-16) bitAnd:16rFFFF) MSB:true. |
101 bytes wordAt:pixelIndex+6 put:(aPixelValue bitAnd:16rFFFF) MSB:true. |
105 bytes unsignedInt16At:pixelIndex+6 put:(aPixelValue bitAnd:16rFFFF) MSB:true. |
102 ! ! |
106 ! ! |
103 |
107 |
104 !Depth64Image methodsFor:'initialization'! |
108 !Depth64Image methodsFor:'initialization'! |
105 |
109 |
106 initialize |
110 initialize |
134 ! ! |
138 ! ! |
135 |
139 |
136 !Depth64Image class methodsFor:'documentation'! |
140 !Depth64Image class methodsFor:'documentation'! |
137 |
141 |
138 version |
142 version |
139 ^ '$Header: /cvs/stx/stx/libview/Depth64Image.st,v 1.4 2014-03-02 13:59:31 cg Exp $' |
143 ^ '$Header$' |
140 ! ! |
144 ! ! |
141 |
145 |