0 Replies Latest reply on Aug 26, 2009 10:52 PM by diego.volpe

    ImageSnapshot.captureBitmapData vs BitmaData.draw - smooth problem


      Trying to capture bitmaps from a RichEditableText component (SDK using ImageSnapshot.captureBitmapData ends up in a not smoothed image. It seems that the smooth argument takes no effect.

      Using BitmapData.draw the captured BitmapData seems to be smoothed.

      Am I missing something? Is that a bug ?


      Here is the code:

      private var imgText:BitmapData;
      protected function captureTextImage():void
           var bmp:BitmapData = new BitmapData( txtFlow.width, txtFlow.height, true );
           bmp.draw( txtFlow, null, null, null, null, true );
           //bmp = ImageSnapshot.captureBitmapData( txtFlow, null, null, null, null, true );
           imgText = bmp;
      <s:RichEditableText id="txtFlow"
           width="450" height="300" backgroundColor="0x0000FF" backgroundAlpha="0.2"
      <s:BitmapImage source="{imgText}" width="{txtFlow.width}" height="{txtFlow.height}"/>