export some functions

This commit is contained in:
lixianjing 2020-05-22 11:37:02 +08:00
parent 5f2855a064
commit 0b79f75209
4 changed files with 1755 additions and 1500 deletions

File diff suppressed because it is too large Load Diff

View File

@ -80,8 +80,7 @@ struct _graphic_buffer_t {
ret_t graphic_buffer_create_for_bitmap(bitmap_t* bitmap);
/**
* @method graphic_buffer_default_create_with_data
* @export none
* @method graphic_buffer_create_with_data
*
*
* > raw图像

View File

@ -27,10 +27,65 @@
BEGIN_C_DECLS
/**
* @method image_fill
*
* @param {bitmap_t*} dst
* @param {rect_t*} dst_r
* @param {color_t} c
*
* @return {ret_t} RET_OK表示成功
*/
ret_t image_fill(bitmap_t* dst, rect_t* dst_r, color_t c);
/**
* @method image_clear
*
* @param {bitmap_t*} dst
* @param {rect_t*} dst_r
* @param {color_t} c
*
* @return {ret_t} RET_OK表示成功
*/
ret_t image_clear(bitmap_t* dst, rect_t* dst_r, color_t c);
/**
* @method image_copy
* framebuffer中
* @param {bitmap_t*} dst
* @param {bitmap_t*} src
* @param {rect_t*} src_r
* @param {xy_t} dx x坐标
* @param {xy_t} dy y坐标
*
* @return {ret_t} RET_OK表示成功
*/
ret_t image_copy(bitmap_t* dst, bitmap_t* src, rect_t* src_r, xy_t dx, xy_t dy);
/**
* @method image_rotate
* framebuffer相应的区域90
* @param {bitmap_t*} dst
* @param {bitmap_t*} src
* @param {rect_t*} src_r
* @param {lcd_orientation_t} o (90)
*
* @return {ret_t} RET_OK表示成功
*/
ret_t image_rotate(bitmap_t* dst, bitmap_t* src, rect_t* src_r, lcd_orientation_t o);
/**
* @method image_blend
* framebuffer指定的区域src的大小和dst的大小不一致则进行缩放
*
* @param {bitmap_t*} dst
* @param {bitmap_t*} src
* @param {rect_t*} dst_r
* @param {rect_t*} src_r
* @param {uint8_t} global_alpha alpha
*
* @return {ret_t} RET_OK表示成功
*/
ret_t image_blend(bitmap_t* dst, bitmap_t* src, rect_t* dst_r, rect_t* src_r, uint8_t global_alpha);
END_C_DECLS

View File

@ -6382,8 +6382,7 @@
],
"annotation": {},
"desc": "创建缓冲区。\n\n> 为了兼容raw图像。",
"name": "graphic_buffer_default_create_with_data",
"export": "none",
"name": "graphic_buffer_create_with_data",
"return": {
"type": "graphic_buffer_t*",
"desc": "返回缓存区。"
@ -16418,6 +16417,10 @@
"desc": "最小值。",
"name": "WIDGET_PROP_MIN"
},
{
"desc": "软键盘上action按钮的文本。",
"name": "WIDGET_PROP_ACTION_TEXT"
},
{
"desc": "提示信息。",
"name": "WIDGET_PROP_TIPS"
@ -46788,6 +46791,29 @@
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
"type": "widget_t*",
"name": "widget",
"desc": "widget对象。"
},
{
"type": "char*",
"name": "action_text",
"desc": "软键盘上action按钮的文本。"
}
],
"annotation": {
"scriptable": true
},
"desc": "设置软键盘上action按钮的文本。",
"name": "edit_set_action_text",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
@ -47104,6 +47130,19 @@
"scriptable": true
}
},
{
"name": "action_text",
"desc": "软键盘上action按钮的文本。内置取值有\n\n* next 将焦点切换到下一个控件。\n* done 完成,关闭软键盘。\n\n也可以使用其它文本比如send表示发送。这个需要自己实现相应的功能处理EVT\\_IM\\_ACTION事件即可。",
"type": "char*",
"annotation": {
"set_prop": true,
"get_prop": true,
"readable": true,
"persitent": true,
"design": true,
"scriptable": true
}
},
{
"name": "keyboard",
"desc": "自定义软键盘名称。",
@ -51228,6 +51267,161 @@
"type": "widget_t*",
"desc": "window对象。"
}
},
{
"params": [
{
"type": "bitmap_t*",
"name": "dst",
"desc": "目标图片对象。"
},
{
"type": "rect_t*",
"name": "dst_r",
"desc": "要填充的目标区域。"
},
{
"type": "color_t",
"name": "c",
"desc": "颜色。"
}
],
"annotation": {},
"desc": "用颜色绘制指定的区域。",
"name": "image_fill",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败返回失败则上层用软件实现。"
}
},
{
"params": [
{
"type": "bitmap_t*",
"name": "dst",
"desc": "目标图片对象。"
},
{
"type": "rect_t*",
"name": "dst_r",
"desc": "要填充的目标区域。"
},
{
"type": "color_t",
"name": "c",
"desc": "颜色。"
}
],
"annotation": {},
"desc": "用颜色填充指定的区域。",
"name": "image_clear",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败返回失败则上层用软件实现。"
}
},
{
"params": [
{
"type": "bitmap_t*",
"name": "dst",
"desc": "目标图片对象。"
},
{
"type": "bitmap_t*",
"name": "src",
"desc": "源图片对象。"
},
{
"type": "rect_t*",
"name": "src_r",
"desc": "要拷贝的区域。"
},
{
"type": "xy_t",
"name": "dx",
"desc": "目标位置的x坐标。"
},
{
"type": "xy_t",
"name": "dy",
"desc": "目标位置的y坐标。"
}
],
"annotation": {},
"desc": "把图片指定的区域拷贝到framebuffer中。",
"name": "image_copy",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败返回失败则上层用软件实现。"
}
},
{
"params": [
{
"type": "bitmap_t*",
"name": "dst",
"desc": "目标图片对象。"
},
{
"type": "bitmap_t*",
"name": "src",
"desc": "源图片对象。"
},
{
"type": "rect_t*",
"name": "src_r",
"desc": "要旋转并拷贝的区域。"
},
{
"type": "lcd_orientation_t",
"name": "o",
"desc": "旋转角度(一般支持90度即可)。"
}
],
"annotation": {},
"desc": "把图片指定的区域进行旋转并拷贝到framebuffer相应的区域本函数主要用于辅助实现横屏和竖屏的切换一般支持90度旋转即可。",
"name": "image_rotate",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败返回失败则上层用软件实现。"
}
},
{
"params": [
{
"type": "bitmap_t*",
"name": "dst",
"desc": "目标图片对象。"
},
{
"type": "bitmap_t*",
"name": "src",
"desc": "源图片对象。"
},
{
"type": "rect_t*",
"name": "dst_r",
"desc": "目的区域。"
},
{
"type": "rect_t*",
"name": "src_r",
"desc": "源区域。"
},
{
"type": "uint8_t",
"name": "global_alpha",
"desc": "全局alpha。"
}
],
"annotation": {},
"desc": "把图片指定的区域渲染到framebuffer指定的区域src的大小和dst的大小不一致则进行缩放。",
"name": "image_blend",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败返回失败则上层用软件实现。"
}
}
],
"events": [],