Exemplo n.º 1
0
//----取得新增可视域-----------------------------------------------------------
//功能: 出现在visible_clip中且不在visible_bak的区域,加入redraw_clip。
//      同时出现在visible_clip和visible_bak中的部分,留在visible_clip中
//      如果dest_blend==true,则仅在visible_bak出现的部分留在visible_bak
//      否则,释放visiblvisible_bak
//参数: gkwin,目标窗口
//返回: 无
//-----------------------------------------------------------------------------
void __GK_GetNewClip(struct tagGkWinRsc *gkwin)
{
    struct tagClipRect *redraw;       //visible_clip-visible_bak多出的部分
    struct tagClipRect *res;          //visible_clip与visible_bak相交的clip

    if(gkwin->visible_bak != NULL)
    {
        __GK_ClipLinkSub(gkwin->visible_clip,gkwin->visible_bak,&res,&redraw);
        __GK_ClipLinkConnect(&gkwin->redraw_clip,redraw);
        gkwin->visible_clip = res;
        if(gkwin->dest_blend)
        {
            __GK_ClipLinkSub(gkwin->visible_bak,gkwin->visible_clip,
                              &res,&redraw);
            gkwin->visible_bak = redraw;
            __GK_FreeClipQueue(res);
        }
        else
        {
            gkwin->visible_bak = __GK_FreeClipQueue(gkwin->visible_bak);
        }
    }
    else
    {
        __GK_ClipLinkConnect(&gkwin->redraw_clip,gkwin->visible_clip);
        gkwin->visible_clip = NULL;
    }
}
Exemplo n.º 2
0
//----取得新增可视域-----------------------------------------------------------
//功能: 出现在visible_clip中且不在visible_bak的区域,加入redraw_clip。
//      同时出现在visible_clip和visible_bak中的部分,留在visible_clip中
//      如果dest_blend==true,则仅在visible_bak出现的部分留在visible_bak
//      否则,释放visiblvisible_bak
//参数: gkwin,目标窗口
//返回: 无
//-----------------------------------------------------------------------------
void __GK_GetNewClip(struct GkWinRsc *gkwin)
{
    struct ClipRect *redraw;       //visible_clip-visible_bak多出的部分
    struct ClipRect *res;          //visible_clip与visible_bak相交的clip

    if(gkwin->visible_bak != NULL)
    {
        __GK_ClipLinkSub(gkwin->visible_clip,gkwin->visible_bak,&res,&redraw);
        __GK_ClipLinkConnect(&gkwin->redraw_clip,redraw);
        gkwin->visible_clip = res;
        if(gkwin->WinProperty.DestBlend == CN_GKWIN_DEST_VISIBLE)
        {
            __GK_ClipLinkSub(gkwin->visible_bak,gkwin->visible_clip,
                              &res,&redraw);
            gkwin->visible_bak = redraw;
            __GK_FreeClipQueue(res);
        }
        else
        {
            gkwin->visible_bak = __GK_FreeClipQueue(gkwin->visible_bak);
        }
    }
    else
    {
        __GK_ClipLinkConnect(&gkwin->redraw_clip,gkwin->visible_clip);
        gkwin->visible_clip = NULL;
    }
}
Exemplo n.º 3
0
//----提取剪切域交集-----------------------------------------------------------
//功能: 剪取srcclip队列中与desclip相交部分,不相交的部分仍然留在srcclip中。
//参数: srcclip,原剪切域链表
//      desclip,目标剪切域链表
//返回: 提取的可视域,NULL = 没有相交部分
//-----------------------------------------------------------------------------
struct tagClipRect *__GK_GetClipLinkInts(struct tagClipRect **srcclip,
                                             struct tagClipRect *desclip)
{
    struct tagClipRect *redraw,*res;
    //提取剪切域队列重叠部分
    __GK_ClipLinkSub(*srcclip,desclip,&redraw,&res);
    *srcclip = res;
    return redraw;
}