diff --git a/packages/IconAPI-Core.package/IconMorph.class/instance/invertWithTransparency.st b/packages/IconAPI-Core.package/IconMorph.class/instance/invertWithTransparency.st index 0add1c3..ac0687d 100644 --- a/packages/IconAPI-Core.package/IconMorph.class/instance/invertWithTransparency.st +++ b/packages/IconAPI-Core.package/IconMorph.class/instance/invertWithTransparency.st @@ -8,7 +8,8 @@ invertWithTransparency |value alpha red green blue| value := bitmap at: pixelIndex. alpha := value bitShift: -24. - red := 255 - ((value bitShift: -16) bitAnd: 255). - green := 255 - ((value bitShift: -8) bitAnd: 255). - blue := 255 - (value bitAnd: 255). - bitmap at: pixelIndex put: (alpha bitShift: 24) + (red bitShift: 16) + (green bitShift: 8) + blue] \ No newline at end of file + alpha > 0 ifTrue: [ + red := 255 - ((value bitShift: -16) bitAnd: 255). + green := 255 - ((value bitShift: -8) bitAnd: 255). + blue := 255 - (value bitAnd: 255). + bitmap at: pixelIndex put: (alpha bitShift: 24) + (red bitShift: 16) + (green bitShift: 8) + blue]] \ No newline at end of file diff --git a/packages/IconAPI-Core.package/IconMorph.class/methodProperties.json b/packages/IconAPI-Core.package/IconMorph.class/methodProperties.json index 35bfd55..e17a19a 100644 --- a/packages/IconAPI-Core.package/IconMorph.class/methodProperties.json +++ b/packages/IconAPI-Core.package/IconMorph.class/methodProperties.json @@ -13,7 +13,7 @@ "iconSize" : "han 5/14/2021 11:40", "iconSize:" : "han 5/14/2021 11:41", "invert" : "AW 5/26/2021 14:26", - "invertWithTransparency" : "AW 5/26/2021 14:27", + "invertWithTransparency" : "AW 5/26/2021 15:02", "invertWithoutTransparency" : "AW 5/26/2021 14:26", "setIcon:" : "hw 5/18/2021 21:15", "setIconColor:" : "hw 5/25/2021 22:04",