Code example for Bitmap

Methods: eraseColorgetHeightgetWidth

0
		postInvalidate();
	} 
	public Bitmap getGraphBitmap() {
		Bitmap bitmap;
	 
		if (graphBitmap != null && (int)(getWidth() - AXIS_PADDING) == graphBitmap.getWidth() && 
				getHeight()-AXIS_PADDING == graphBitmap.getHeight()) {
			graphBitmap.eraseColor(Color.BLACK);
			bitmap = graphBitmap; 
		} else { 
			bitmap = Bitmap.createBitmap((int)(getWidth() - AXIS_PADDING), getHeight()-AXIS_PADDING, Bitmap.Config.ARGB_8888);
		} 
		Canvas c = new Canvas(bitmap);
		RectF area = graph.getModifyRect();
		float l = area.left;
		float r = area.right;
		float w = r-l;
		 
	 
		float deltaMove = mMoveX*w/bitmap.getWidth();
Connect your IDE to all the code out there  Get Codota for Java