如何将图表、表格等某个区域中的数据保存成图片,通过下面代码即可实现

 

   import flash.net.FileReference;
   import mx.graphics.ImageSnapshot;
   import mx.graphics.codec.PNGEncoder;
   
   private function saveImage():void
   {
    var fileRef:FileReference = new FileReference();

    //grp 为Group的ID号
    var image:ImageSnapshot=ImageSnapshot.captureImage(grp, 300, new PNGEncoder());
    fileRef.save(image.data, "chart.png");
   }

相关文章:

  • 2021-09-09
  • 2021-06-04
  • 2021-05-14
  • 2021-04-10
  • 2021-12-22
  • 2021-10-11
猜你喜欢
  • 2021-05-27
  • 2021-12-15
  • 2021-11-01
  • 2021-05-07
  • 2021-06-08
  • 2021-08-05
  • 2021-11-19
相关资源
相似解决方案