Example #1
0
Frames_GetFrameMixPos(LCUI_Frames *stream, LCUI_Frame *frame)
/* 功能:获取指定帧在整个动画容器中的位置 */
{
	LCUI_Pos pos;
	pos = Align_Get_Pos(	stream->size, 
				Graph_GetSize(frame->pic), 
				ALIGN_MIDDLE_CENTER );
	return Pos_Add(pos, frame->offset);
}
Example #2
0
static void Show_Window(LCUI_Widget *win_p)
/* 功能:在窗口显示时,进行相关处理 */
{
    LCUI_Size size;
    LCUI_Pos pos;
    LCUI_Window *win;

    win = (LCUI_Window*)Get_Widget_PrivData(win_p);
    win->count++;
    if(win->count == 1) {/* 如果是第一次显示 */
        size = _Get_Widget_Container_Size( win_p );
        pos = Align_Get_Pos( size, _Get_Widget_Size(win_p), win->init_align );
        Move_Widget( win_p, pos );
    }
    //有待扩展
}
Example #3
0
static void 
ActiveBox_ExecUpdate(LCUI_Widget *widget)
/* 功能:更新ActiveBox部件内显示的图像 */
{
	LCUI_Rect rect;
	LCUI_Frames *frames;
	LCUI_Graph *frame_graph;
	LCUI_Pos pos;
	
	frames = ActiveBox_GetFrames( widget );
	frame_graph = Frames_GetGraphSlot( frames );
	pos = Align_Get_Pos( Widget_GetSize(widget), 
				frames->size, ALIGN_MIDDLE_CENTER);

	Widget_SetBackgroundTransparent( widget, TRUE );
	Widget_SetBackgroundImage( widget, frame_graph );
	Widget_SetBackgroundLayout( widget, LAYOUT_NONE );
	rect.x = pos.x;
	rect.y = pos.y;
	rect.width = frame_graph->width;
	rect.height = frame_graph->height;
	Widget_InvalidArea( widget, rect );
}