libgdx/libgdx — pull request #414 by vbousquet (2013-05-19 23:29:32+00:00)
Title: Add support for 0-alpha pixel to TexturePacker2

The current implementation uses Graphics2d to render image when creating atlas texture.
Graphics2d will not preserve the color of pixel with 0 alpha. This can be seen when scaling down the texture with linear filtering ; blending will be performed using black pixels for the 0 alpha pixel instead of the initial color.

This modification use direct ARGB copy to preserve color when alpha is 0, leading to correct filtering.

I performed some testing comparing results between the current implementation and this one, not finding unexpected changes. There are some situations where the current implementation will behave "strangely" (at least, I don't fully understand), like using rotation, different padding on X and Y axis with non even padding. Not sure of the use case of this type of situation ; anyway, the result with this implementation should be satisfying as well.

I have read the sticky post from the forum (http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=635) and I think this is different.
This change will only help if you produce sprite with color over fully transparent area (like in this post : http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=635&p=27934)