Code example for Canvas

Methods: setBitmap

0
	private Bitmap createPieChart(final Context context)
	{ 
		final VMAccount cache = PreferencesUtil.getCachedAccount(context);
		final MinutesPieGraphDrawable graph = new MinutesPieGraphDrawable(context, cache);
 
		final Canvas c = new Canvas();
		final Bitmap b = Bitmap.createBitmap(72, 72, Bitmap.Config.ARGB_8888);
		c.setBitmap(b);
		graph.drawOnCanvas(c, new Rect(0, 0, 72, 72));
		return b;
	} 
 
}