1 Reply Latest reply on Jun 6, 2011 12:14 AM by Hazar Hiasat

    when taking Image snapshot while changing the layout direction ,the characters is missing!

    Hazar Hiasat

      The application is a multilingual, so if the language choosen is arabic i changed the layout this.layoutDirection ="rtl";

      after doing so , if i tried to take an image snapshot the chart will miss all the charachters as shown below .

      if i comment this.layoutDirection ="rtl", the image snapshot will work fine!

       

      rtl.png

      Any help please?!

      I am using Flex builder 4 , is this solved in flex builder 4.5?!

        • 1. Re: when taking Image snapshot while changing the layout direction ,the characters is missing!
          Hazar Hiasat Level 1

          Also , I tried to create the BitmapData , but the same problem

           

          //Code that i am using to generate ImageSnapshot

          var image:ImageSnapshot = ImageSnapshot.captureImage(this, 300, new PNGEncoder(), true);

          var file:FileReference = new FileReference();

          file.save(image.data, chartDescription +".png");

           

          //Code that i am using to generate BitmapData

          var bitmapData:BitmapData = new BitmapData (this.width,this.height);

          bitmapData.fillRect(new Rectangle (0,0,bitmapData.width,bitmapData.height),0x00000000);

          bitmapData.draw(this);

          var fileRef:FileReference = new FileReference();

          var encoder:PNGEncoder = new PNGEncoder();

          var data:ByteArray = encoder.encode(bitmapData);

          fileRef.save(data,chartDescription + ".png");