# HG changeset patch # User Claus Gittinger # Date 1503657480 -7200 # Node ID 6aca0b81e5a9e351fb6174cdc4fc08491c10df44 # Parent 8ba2da3ccfc32bf04e08a33bd14d5e0c1b6a8a53 #REFACTORING by cg class: FixedPaletteWithAlpha changed: #alphaByteAt: diff -r 8ba2da3ccfc3 -r 6aca0b81e5a9 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