[태그:] Bitmap

  • Bitmap.bitmapData sets smoothing to false.

    Bitmap.bitmapData 속성을 통해서 비트맵 이미지를 교체하는 경우 스무딩 속성이 false로 변경되어 버립니다. Bitmap(bd, “auto”, true); 처럼 비트맵 객체를 생성할 때 스무딩을 true로 설정하였다 하더라도, bitmapData 속성을 변경하면, smothing 속성이 무조건 false로 바뀝니다.

    var bd1:BitmapData = new BitmapData(300, 225);
    bd1.draw(mc, null, null, null, null, true);
    
    var bmp1:Bitmap = new Bitmap(bd1, "auto", true);
    var bmp2:Bitmap = new Bitmap(bd1, "auto", true);
    
    addChild(bmp1);
    addChild(bmp2);
    
    bmp1.y = bmp2.y = -50;
    bmp1.x = 50;
    bmp2.x = 350;
    bmp1.rotation = bmp2.rotation = 30;
    
    bmp2.bitmapData = bd1;

    그러므로 bitmapData 속성을 변경하면, 다음과 같이 smoothing 속성을 다시 true로 설정해 주어야 합니다.

    bmp2.smoothing = true;