SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
I want to use code to intercept a picture, but find that the image is empty
surface.buildDrawingCache(); Bitmap src = surface.getDrawingCache();//save screenshot ((ImageView)findViewById(R.id.iv)).setImageBitmap(src);
how can I get the image of suface。
By default SciChartSurface uses GlSurfaceView based RenderSurface implementation which allows to use OpenGL for drawing of chart. But there is one side effect – in this case chart isn’t draws as part of Android View hierarchy so you can’t use drawing cache.
To workaround this limiation we’ve added exportToBitmap() method for SciChartSurface which allows to render chart to a Bitmap:
Hope this will help you!
Please login first to submit.