AlphaBitmap继承自GraphicsActivity类, 而GraphicsActivity继承自PictureLayout类,而PictureLayout类继承自ViewGroup类,关系如下图:
openRawResource:打开一个数据流用于读取原始资源,这些资源必须是文件集合,它可以用于打开drawable, sound, raw 资源,但它不能打开strings or color resources.
该例子是没有通过XML布局文件来显示,而是通过setContentView(new SampleView(this));来实现需要显示。其中SampleView继承自View。下面有几个要点:
//从一幅图像抽取色值变为新的图像,一般是画笔的颜色 同下面
mBitmap2 = mBitmap.extractAlpha();