MTK图形图象函数.docS32 gdi_image_draw_id(S32 offset_x, S32 offset_y, U16 image_id);
offset_x和offset_y 是图片左上角的坐标,image_id是指向图片的枚举类型,
用法如下:
ADD_APPLICATION_IMAGE(MAIN_MENU_MATRIX_PHONEBOOK_ICON,CUST_IMG_PATH"\\\\MainLCD\\\\MainMenu\\\\MATRIX\\\\");
S32 gdi_image_draw(S32 offset_x, S32 offset_y, U8 *image_ptr);
;
在MTK平台里,image_ptr = (U8*)GetImage(image_id);
S32 gdi_image_draw_file(S32 offset_x, S32 offset_y, S8 *image_name);
Image_name是图片的文件名;
S32 gdi_image_get_dimension_id(U16 image_id, S32 *width, S32 *height);
S32 gdi_image_get_dimension_file(S8 *image_name, S32 *width, S32 *height);
S32 gdi_image_get_dimension(U8 *image_ptr, S32 *width, S32 *height);
获得图片的长宽参数
S32 gdi_image_get_frame_count_id(U16 image_id, S32 *frame_count);
S32 gdi_image_get_frame_count_id(U16 image_id, S32 *frame_count);
获得动态图片的帧数
画点函数;
6、void UI_putpixel(s32 x,s32 y,color c);
7、关于剪切矩形:
void UI_set_clip(s32 x1,s32 y1,s32 x2,s32 y2);
void UI_reset_clip(void);
void UI_pop_clip(void);
void UI_set_text_clip(s32 x1,s32 y1,s32 x2,s32 y2);
void UI_reset_text_clip(void);
void UI_pop_text_clip(void);
画线函数;
颜色为c的一条直线:
void UI_line(s32 x1,s32 y1,s32 x2,s32 y2,color c);
颜色为c,宽度为w的一条直线:
void UI_wline(s32 x1,s32 y1,s32 x2,s32 y2,color c,s32 w);
画一个空心矩形:
void UI_draw_rectangle(s32 x1,s32 y1,s32 x2,s32 y2,color c);
填充一个矩形:
void UI_fill
MTK图形图象函数 来自淘豆网m.daumloan.com转载请标明出处.