#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Fri, 25 Aug 2017 12:38:00 +0200
changeset 8104 6aca0b81e5a9
parent 8103 8ba2da3ccfc3
child 8105 5f85a7892cd5
#REFACTORING by cg class: FixedPaletteWithAlpha changed: #alphaByteAt:
FixedPaletteWithAlpha.st
--- a/FixedPaletteWithAlpha.st	Fri Aug 25 11:27:52 2017 +0200
+++ b/FixedPaletteWithAlpha.st	Fri Aug 25 12:38:00 2017 +0200
@@ -70,7 +70,7 @@
 
     alphaMask == 0 ifTrue:[^ 0]. "/ no alpha component
     
-    a := ((index-1 bitShift:alphaShift negated) bitAnd:alphaMask).
+    a := ((index-1 rightShift:alphaShift) bitAnd:alphaMask).
     aa := (a * 255.0 / (alphaMask)) rounded.
     ^ aa
 
@@ -82,6 +82,8 @@
      (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) blueByteAt:0+1  
      (FixedPalette redShift:11 redMask:16r1F greenShift:5 greenMask:16r3F blueShift:0 blueMask:16r1F) blueByteAt:16r7FFF+1  
     "
+
+    "Modified: / 25-08-2017 / 12:22:59 / cg"
 !
 
 bitsAlpha