绘制 9patch

 Bitmap bmp_9patch = BitmapFactory.decodeResource(getResources(), R.drawable.ic_background);
 NinePatch np = new NinePatch(bmp_9patch, bmp_9patch.getNinePatchChunk(), null);
 Rect rect = new Rect(0, 0, 2000, 50);
 np.draw(canvas, rect);