You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/12/02 07:29:27 UTC

[GitHub] [incubator-echarts] vson1718 opened a new issue #11761: 三星galaxy s11 Android Webview 截图echarts 区域显示空白

vson1718 opened a new issue #11761: 三星galaxy s11  Android Webview 截图echarts 区域显示空白
URL: https://github.com/apache/incubator-echarts/issues/11761
 
 
   ### Version
   4.4.0
   
   ### Steps to reproduce
   1.使用webView打开Html(使用echarts4.4.0),显示正常(AndroidManifest.xml中设置属性Android:hardwareAccelerated=”false”。)
   2.使用截图功能相关代码
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    WebView.enableSlowWholeDocumentDraw();
   }
   
   private Bitmap captureWebView(WebView webView){
   
    Picture picture = webView.capturePicture();
   
    int width = picture.getWidth();
   
    int height = picture.getHeight();
   
    if (width > 0 && height > 0) {
   
     Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
   
     Canvas canvas = new Canvas(bitmap);
   
     picture.draw(canvas);
   
     return bitmap;
   
    }
   
    return null;
   
   }
   
   ### What is expected?
   三星galaxy s11 使用 Webview 截图echarts 区域不显示空白
   
   ### What is actually happening?
   三星galaxy s11 使用 Webview 截图echarts 区域显示空白
   
   ---
   截图WebView,分享到微信
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org