0 Replies Latest reply on Nov 3, 2011 5:33 PM by learningFlex5000

    StageWebView - How to prevent stretching of the bitmap obtained through drawViewPortToBitmapData?

    learningFlex5000 Level 1

      I am trying to show the page displayed using StageWebView as a bitmap. As per the documentation we need to use DrawViewPortToBitMapData. While displaying the bitmap in a UIComponent, the image is getting stretched. How can I prevent that?

           bitmapData = new BitmapData(webView.viewPort.width, webView.viewPort.height, false,
          
      0x000000 );
           webView
      .drawViewPortToBitmapData(bitmapData);
           webViewBmp
      = new Bitmap(bitmapData);
           webView
      .stage = null;

         uiComponent
      = new UIComponent;
         uiComponent
      .width=webView.viewPort.width;
         uiComponent
      .height=webView.viewPort.height;
         uiComponent
      .addChild(webViewBmp);