/** * Saves the content of the graphical view to a bitmap. * * @return the bitmap */ public Bitmap toBitmap() { setDrawingCacheEnabled(false); if (!isDrawingCacheEnabled()) { setDrawingCacheEnabled(true); } if (mRenderer.isApplyBackgroundColor()) { setDrawingCacheBackgroundColor(mRenderer.getBackgroundColor()); } setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH); return getDrawingCache(true); }