Closed soarcn closed 11 years ago
@soarcn I don't quite understand. What do you mean by alpha info lost? Can you post some simple example code with loaded image showing your problem?
sorry for my english, it means the transparent area will be shown as grey area. you can just use one simple PNG file (like bot.png in mode demo). I use following code to create the sprite
class Toss extends FlxSprite {
public function new(postion:Point = null )
{
if (postion == null)
postion = new Point(FlxG.width/2,FlxG.height/2);
super(postion.x, postion.y);
loadRotatedGraphic(Env.loadBitmap("toss.png"));
}
@soarcn That's strange. I don't have such problems. Maybe you're using non 32-bit images? And what Env
class is?
yes, you are right, I change it to 32bit images, the defects fixed. Env come from the HXmine example which joshuagranick provide for the multi-resolution Adaptive (provide different set of images, choose the right one base on the dpi )
I notice that this is not happen in Flixel but other framework(like haxepunk), but I would really like to know how to deal that.
when load a PNG file with transparent background by using loadRotatedGraphic, the alpha info will lost, transparent area will be shown as grey area.
but with loadGraphic, working correct, is this a limitation of loadRotatedGraphic?