Bitmap createBitmap参数(一)
2016-06-07 10:28
204 查看
api:
Returns a mutable bitmap with the specified width and height. Its initial density is as per
返回一个与指定的宽度和高度可变的位图。初始密度是根据getDensity()。
Parameters
width:
The width of the bitmap
height:
The height of the bitmap
config:
The bitmap config to create. 位图创建配置。
Returns
Throws
IllegalArgumentException if
the width or height are <= 0
Bitmap createBitmap (int width, int height, Bitmap.Config config)
Returns a mutable bitmap with the specified width and height. Its initial density is as per
getDensity().
返回一个与指定的宽度和高度可变的位图。初始密度是根据getDensity()。
Parameters
width:
int:
The width of the bitmap
height:
int:
The height of the bitmap
config:
Bitmap.Config:
The bitmap config to create. 位图创建配置。
Returns
Throws
IllegalArgumentException if
the width or height are <= 0
/** * 返回一个指定高度和宽度的不可改变的位图<br> * 方 法 名:createBitmap <br> * 创 建 人: <br> * 创建时间:2016-6-7 上午10:27:13 <br> * 修 改 人: <br> * 修改日期: <br> * @param width * @param height * @param config * @return Bitmap */ public static Bitmap createBitmap(int width, int height, Config config) { Bitmap bitmap; try { Bitmap localBitmap2 = Bitmap.createBitmap(width, height, config); bitmap = localBitmap2; } catch (OutOfMemoryError localOutOfMemoryError) { gc(); bitmap = Bitmap.createBitmap(width, height, config); } return bitmap; }
相关文章推荐
- 面向对象——多态
- Oracle中一些常用函数
- android屏幕类
- BLE的设备各种状态
- Junit 文件URL报错解决办法
- js拼字符串传action时 不要用#号拼接,用逗号
- 示波器入门之带宽(BW)
- 关于航模无刷电机与电调的疑问
- websphere启动节点和控制台步骤
- 2016-06-07【普元EOS Studio】
- windows搭建***并且绑定ip
- (1)初始 odoo framework
- git不支持中文的乱码解决方案
- Oracle中单引号
- javascript基础语法——表达式
- 李洪强 - C语言8-Scanf函数
- C# 中的析构函数
- opensips.cfg研究分析(待完善修改)
- selenium-webdriver(python) (十五) -- 鼠标事件
- 基于卡方的独立性检验