代码拉取完成,页面将自动刷新
函数名称 | 说明 |
---|---|
graphic_buffer_attach | 附件到指定的内存。 |
graphic_buffer_create_for_bitmap | 为位图创建缓冲区。 |
graphic_buffer_create_with_data | 创建缓冲区。 |
graphic_buffer_create_with_data_ex | 创建缓冲区。 |
graphic_buffer_destroy | 销毁缓冲区。 |
graphic_buffer_get_physical_height | 获取 graphic_buffer 真实物理的的高度 |
graphic_buffer_get_physical_line_length | 获取 graphic_buffer 真实物理的的行长度 |
graphic_buffer_get_physical_width | 获取 graphic_buffer 真实物理的的宽度 |
graphic_buffer_is_valid_for | 用于检查graphic buffer的有效性。 |
graphic_buffer_lock_for_read | 为读取数据而锁定缓冲区。 |
graphic_buffer_lock_for_write | 为修改数据而锁定缓冲区。 |
graphic_buffer_set_physical_height | 设置 graphic_buffer 真实物理的的高度 |
graphic_buffer_set_physical_line_length | 设置 graphic_buffer 真实物理的的行长度 |
graphic_buffer_set_physical_width | 设置 graphic_buffer 真实物理的的宽度 |
graphic_buffer_unlock | 解锁缓冲区。 |
附件到指定的内存。
ret_t graphic_buffer_attach (graphic_buffer_t* buffer, void* data, uint32_t w, uint32_t h);
参数 | 类型 | 说明 |
---|---|---|
返回值 | ret_t | 返回RET_OK表示成功,否则表示失败。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
data | void* | 内存数据。 |
w | uint32_t | 宽度。 |
h | uint32_t | 宽度。 |
为位图创建缓冲区。
ret_t graphic_buffer_create_for_bitmap (bitmap_t* bitmap);
参数 | 类型 | 说明 |
---|---|---|
返回值 | ret_t | 返回RET_OK表示成功,否则表示失败。 |
bitmap | bitmap_t* | 位图对象。 |
创建缓冲区。
为了兼容raw图像。
graphic_buffer_t* graphic_buffer_create_with_data (const uint8_t* data, uint32_t w, uint32_t h, bitmap_format_t format);
参数 | 类型 | 说明 |
---|---|---|
返回值 | graphic_buffer_t* | 返回缓存区。 |
data | const uint8_t* | 数据。 |
w | uint32_t | 宽度。 |
h | uint32_t | 宽度。 |
format | bitmap_format_t | 格式。 |
创建缓冲区。
为了兼容raw图像。
graphic_buffer_t* graphic_buffer_create_with_data_ex (const uint8_t* virtual_data, const uint8_t* physical_data, uint32_t w, uint32_t h, uint32_t line_length, bitmap_format_t format);
参数 | 类型 | 说明 |
---|---|---|
返回值 | graphic_buffer_t* | 返回缓存区。 |
virtual_data | const uint8_t* | 数据虚拟地址。 |
physical_data | const uint8_t* | 数据物理地址。 |
w | uint32_t | 宽度。 |
h | uint32_t | 宽度。 |
line_length | uint32_t | 每行宽度(字节数) |
format | bitmap_format_t | 格式。 |
销毁缓冲区。
ret_t graphic_buffer_destroy (graphic_buffer_t* buffer);
参数 | 类型 | 说明 |
---|---|---|
返回值 | ret_t | 返回RET_OK表示成功,否则表示失败。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
获取 graphic_buffer 真实物理的的高度
uint32_t graphic_buffer_get_physical_height (graphic_buffer_t* buffer);
参数 | 类型 | 说明 |
---|---|---|
返回值 | uint32_t | 返回高度。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
获取 graphic_buffer 真实物理的的行长度
uint32_t graphic_buffer_get_physical_line_length (graphic_buffer_t* buffer);
参数 | 类型 | 说明 |
---|---|---|
返回值 | uint32_t | 返回行长度。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
获取 graphic_buffer 真实物理的的宽度
uint32_t graphic_buffer_get_physical_width (graphic_buffer_t* buffer);
参数 | 类型 | 说明 |
---|---|---|
返回值 | uint32_t | 返回宽度。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
用于检查graphic buffer的有效性。
bool_t graphic_buffer_is_valid_for (graphic_buffer_t* buffer, bitmap_t* bitmap);
参数 | 类型 | 说明 |
---|---|---|
返回值 | bool_t | 返回TRUE表示有效,否则表示无效。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
bitmap | bitmap_t* | 位图对象。 |
为读取数据而锁定缓冲区。
uint8_t* graphic_buffer_lock_for_read (graphic_buffer_t* buffer);
参数 | 类型 | 说明 |
---|---|---|
返回值 | uint8_t* | 返回缓存区的首地址。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
为修改数据而锁定缓冲区。
uint8_t* graphic_buffer_lock_for_write (graphic_buffer_t* buffer);
参数 | 类型 | 说明 |
---|---|---|
返回值 | uint8_t* | 返回缓存区的首地址。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
设置 graphic_buffer 真实物理的的高度
ret_t graphic_buffer_set_physical_height (graphic_buffer_t* buffer, uint32_t height);
参数 | 类型 | 说明 |
---|---|---|
返回值 | ret_t | 返回RET_OK表示成功,否则表示失败。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
height | uint32_t | 真实物理的的高度。 |
设置 graphic_buffer 真实物理的的行长度
ret_t graphic_buffer_set_physical_line_length (graphic_buffer_t* buffer, uint32_t line_length);
参数 | 类型 | 说明 |
---|---|---|
返回值 | ret_t | 返回RET_OK表示成功,否则表示失败。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
line_length | uint32_t | 真实物理的的行长度。 |
设置 graphic_buffer 真实物理的的宽度
ret_t graphic_buffer_set_physical_width (graphic_buffer_t* buffer, uint32_t width);
参数 | 类型 | 说明 |
---|---|---|
返回值 | ret_t | 返回RET_OK表示成功,否则表示失败。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
width | uint32_t | 真实物理的的宽度。 |
解锁缓冲区。
ret_t graphic_buffer_unlock (graphic_buffer_t* buffer);
参数 | 类型 | 说明 |
---|---|---|
返回值 | ret_t | 返回RET_OK表示成功,否则表示失败。 |
buffer | graphic_buffer_t* | 图像缓冲区对象。 |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。