在S60加载Bitmap和Mask的效率
来源:互联网 发布:数据库中的sequence 编辑:程序博客网 时间:2024/06/05 18:38
在S60加载Bitmap和Mask的效率
From Forum Nokia Wiki
_LIT(KYourMifFile, “resource//apps//yourmif.mif”);
//yourmif.mif contains svgs
include <yourmif.mbg> in .cpp file
// In header file
CFbsBitmap* iFocusBitmap;
CFbsBitmap* iBitmapMask;
// anywhere in .cpp file
if(iFocusBitmap == NULL)
{
// load the image and mask
AknIconUtils::CreateIconL( iFocusBitmap,
iBitmapMask,
KYourMifFile,
EMbmYourMif_focus,
EMbmYourMif_mask );
}
TSize size(Rect().Width()*10/100,Rect().Height()*10/100);
AknIconUtils::SetSize(iFocusBitmap,size,EAspectRatioNotPreserved);
AknIconUtils::SetSize(iBitmapMask,size,EAspectRatioNotPreserved );
// In the destructor
delete iFocusBitmap;
delete iBitmapMask;
AknIconUtils::SetSize初始化给定尺寸的图标,参数aBitmap是CAknBitmap的示例,如AknIconUtils方式生成。如果不是CAknBitmap,这个方法无效。注意这里调用设置的是bitmap和mask(如果它存在的话),如果不调用SetSize方法,那么位图将无法被绘制到屏幕上。
尽管CreateIconL有重载方法只加载单个图片,但上述方法在加载和修改尺寸方面更有效率。
- 在S60加载Bitmap和Mask的效率
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- Bitmap的加载和Cache
- android的drawable 和bitmap的效率对比测试
- Android Bitmap的加载和Cache
- 十二、Bitmap的加载和Cache
- 第十二章 、Bitmap的加载和Cache
- 下拉框赋值问题
- 更改SERVLET里的方法中的传递参数的名称为request,response(原先的为:arg0,arg1)的方法
- zju2857图像转换Image Transformation
- 查看linux 版本命令
- 新人贴,求分
- 在S60加载Bitmap和Mask的效率
- CnPack VCL组件库中 TCnButtonEdit 组件的BUG修正
- GPRS/CDMA行业应用中的TCP与UDP的比较
- Java Swing 窗体居中
- MongoDB配置Master和Slave模式
- Java 面向对象编程 常用到的原则
- JAVA项目开发
- VB连接SQL2000数据库代码
- Oracle 参数 游标[游标更新删除数据]