开发者

How to get color from int value on blackberry

I've 开发者_高级运维got int value (for red,green,blue) returned from a Web Service.

topR = 0.14
topG = 0.14
topB = 0.14


bottomR =0.62
bottomG =0.62
bottomB =0.62

From this value how to get color on blackberry.

Pls help me.


Maybe this is what your looking for

private int color =  0x00000000;  

public void setColor(int r, int g, int b)
{
     color = (255<<24) | (r<<16) | (g<<8) | b;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜