当前位置:编程学习 > JAVA >>

android中怎么去实现j2me中的drawRGB方法

j2me中的
drawRGB(int[] rgbData, int offset, int scanlength, int x, int y, int width, int height, boolean processAlpha)

请大侠帮个忙。。 --------------------编程问答-------------------- 同求~ --------------------编程问答-------------------- drawARGB(int a, int r, int g, int b)  --------------------编程问答-------------------- 学习学习 --------------------编程问答--------------------
引用楼主 lwanghaol 的回复:
j2me中的
drawRGB(int[] rgbData, int offset, int scanlength, int x, int y, int width, int height, boolean processAlpha)

请大侠帮个忙。。


哈哈 我找到了 分享下
public void drawRGB(int[] rgbData, int offset, int scanlength, int x,
int y, int width, int height, boolean processAlpha) {
Bitmap b = Bitmap.createBitmap(width, height,
processAlpha ? android.graphics.Bitmap.Config.ARGB_8888
: android.graphics.Bitmap.Config.RGB_565);
b.setPixels(rgbData, offset, scanlength, 0, 0, width, height);
mCanvas.drawBitmap(b, x, y, mPaint);
}
补充:Java ,  J2ME
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,