當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetGraphic函數代碼示例

本文整理匯總了C++中GetGraphic函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetGraphic函數的具體用法?C++ GetGraphic怎麽用?C++ GetGraphic使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetGraphic函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GetWndWidth

int32 SQRButton::Create( const WndCreateParam& param )
{
	WndCreateParam newParam = param;
	newParam.uStyle |= WS_CHILD | WS_IGNOREWHEEL;
	int32 re = SQRWnd::Create( newParam );

	float nWidth  = GetWndWidth();
	float nHeight = GetWndHeight();
	CFRect rt( 0, 0, nWidth, nHeight );
	uint32 dwColor;
	dwColor = CColor::RandDark();
	m_MouseOverImage.AddImage( GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), dwColor );
	dwColor = CColor::RandDark();
	m_ClickDownImage.AddImage( GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), dwColor );

	m_ClickDownColor = 0xffffffff;
	m_MouseOverColor = 0xffffffff;

	m_MouseOverBcColor = 0;
	m_ClickDownBcColor = 0;

	m_uFlashCircle    = 0;
	m_uFlashStartTime = 0;
	m_uFlashEndTime   = 0;
    
	return re;
}
開發者ID:LaoZhongGu,項目名稱:RushGame,代碼行數:27,代碼來源:SQRButton.cpp

示例2: GetWndWidth

int32 SQRCheckButton::Create( const WndCreateParam& param )
{
	int32 re = SQRButton::Create( param );

	float nWidth  = GetWndWidth();
	float nHeight = GetWndWidth();
	CFRect rt( 0.0f, 0.0f, nWidth, nHeight );
    m_UncheckMouseOverImage.AddImage( GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), 0xff567890 );
    m_UncheckClickDownImage.AddImage( GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), 0xff5678ff );
    m_UncheckEnableImage.   AddImage( GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), 0xff456789 );
	m_UncheckDisableImage.  AddImage( GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), 0xff555555 );
	
	m_UncheckEnableColor		= 0xffffffff;
	m_UncheckDisableColor		= 0xffffffff;
	m_UncheckMouseOverColor		= 0xffffffff;
	m_UncheckClickDownColor		= 0xffffffff;
	
	m_UncheckMouseOverBcColor	= 0;
	m_UncheckClickDownBcColor	= 0;
	m_UncheckEnableBcColor		= 0;
	m_UncheckDisableBcColor		= 0;
 
    m_bCheck					= false;

	return re;
}
開發者ID:LaoZhongGu,項目名稱:RushGame,代碼行數:26,代碼來源:SQRCheckButton.cpp

示例3: GetWndOrgWidth

void SQRButton::SetBackImageColor(uint32 uColor)
{
	float nWidth  = GetWndOrgWidth();
	float nHeight = GetWndOrgHeight();
	CFRect rt( 0, 0, nWidth, nHeight );
	m_hWnd->m_Enable.ClearImage();
	m_hWnd->m_Disable.ClearImage();
	m_hWnd->m_Enable.AddImage( GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), uColor );
	m_hWnd->m_Disable.AddImage(GetGraphic(), 0, "", &rt, CFPos(0.0f, 0.0f), uColor );
}
開發者ID:LaoZhongGu,項目名稱:RushGame,代碼行數:10,代碼來源:SQRButton.cpp

示例4: GetFlushDialog

void SQRButton::CreatWndTex()
{
	// ÏÔʾ֮ǰÉêÇë×ÊÔ´
	if ( m_FlushDlg == NULL )
	{
		m_FlushDlg = GetFlushDialog();
		if ( m_FlushDlg == NULL ) return;
	}
	m_MouseOverImage.CreatTex( GetGraphic(), m_FlushDlg );
	m_ClickDownImage.CreatTex( GetGraphic(), m_FlushDlg );
	SQRWnd::CreatWndTex();
}
開發者ID:LaoZhongGu,項目名稱:RushGame,代碼行數:12,代碼來源:SQRButton.cpp

示例5: ClearUp

void CBigMap::InitMapData( const TCHAR* szMapFile)
{
	ClearUp();

	m_SceneName = szMapFile;
	
	//讀取區域名字和文件名對應關係
	if(!LoadConfig(m_SceneName))
		return;

	//創建m_MapTextureClose
	//創建m_MapTextureOpen
	CPkgFile::EnableAsyncRead(false);
	string FileName = "";
	format(FileName,"%s/BigMap/open.dds",m_SceneName.c_str());
	if(m_bOpen)
		GetGraphic()->CreateTexture(PATH_ALIAS_RES.c_str(), FileName.c_str(),&m_MapTextureOpen);
	else
	{
		m_MapTextureOpen = NULL;
		return;
	}
	FileName.clear();
	format(FileName,"%s/BigMap/close.dds",m_SceneName.c_str());
	if(m_bClose)
		GetGraphic()->CreateTexture(PATH_ALIAS_RES.c_str(), FileName.c_str(),&m_MapTextureClose);
	else
	{
		m_MapTextureClose = NULL;
		return;
	}

	SafeRelease(m_pAlphaTexture);
	m_pAlphaTexture = GetGraphic()->CreateRenderTarget();
	m_pAlphaTexture->SetWidth(uint32(GetWndWidth()));
	m_pAlphaTexture->SetHeight(uint32(GetWndHeight()));
	m_pAlphaTexture->SetUseDepthBuffer(false);
	m_pAlphaTexture->SetFormat(TFMT_A8R8G8B8);
	m_pAlphaTexture->Create();

	m_BackTexUV[2] = CVector2f(	0.0f , float(m_pAlphaTexture->GetHeight()));
	m_BackTexUV[0] = CVector2f( 0.0f , 0.0f );
	m_BackTexUV[3] = CVector2f( float(m_pAlphaTexture->GetWidth()) , float(m_pAlphaTexture->GetHeight()) );
	m_BackTexUV[1] = CVector2f( float(m_pAlphaTexture->GetWidth())   , 0.0f);
	m_fRTWidth = float(m_pAlphaTexture->GetWidth());
	m_fRTHeight = float(m_pAlphaTexture->GetHeight());

	if(m_pAlphaTexture==NULL)
		return;
	//string testdir = szMapFile;
	//testdir+= "yhl.dds";
	//m_pAlphaTexture->SaveToFile(testdir);
}
開發者ID:svn2github,項目名稱:ybtx,代碼行數:53,代碼來源:CBigMap.cpp

示例6: GetFlushDialog

void SQRCheckButton::CreatWndTex()
{
	// 顯示之前申請資源
	if ( m_FlushDlg == NULL )
	{
		m_FlushDlg = GetFlushDialog();
		if ( m_FlushDlg == NULL ) return;
	}
	m_UncheckMouseOverImage.CreatTex( GetGraphic(), m_FlushDlg );
	m_UncheckClickDownImage.CreatTex( GetGraphic(), m_FlushDlg );
	m_UncheckEnableImage.CreatTex( GetGraphic(), m_FlushDlg );
	m_UncheckDisableImage.CreatTex( GetGraphic(), m_FlushDlg );
	SQRButton::CreatWndTex();
}
開發者ID:LaoZhongGu,項目名稱:RushGame,代碼行數:14,代碼來源:SQRCheckButton.cpp

示例7: CColor

void CBigMap::UpdateVisibleRegion()
{
	if(m_pAlphaTexture==NULL)
		return;
	m_pAlphaTexture->Begin(true);
	{
		m_pAlphaTexture->SetClearColor( CColor(0,0,0,0) );
		m_pAlphaTexture->Clear();
		GetGraphic()->SwapBegin();
		AlphaTexsRenderToTexture();
		GetGraphic()->SwapEnd();
	}
	m_pAlphaTexture->End();

}
開發者ID:svn2github,項目名稱:ybtx,代碼行數:15,代碼來源:CBigMap.cpp

示例8: getBox

bool Picture::contains (PointObj& po, Graphic* gs) {
    if (!IsEmpty()) {
        Iterator i;
        FullGraphic gstemp;
        Transformer ttemp;
        BoxObj b;

	getBox(b, gs);

	if (b.Contains(po)) {
	    gstemp.SetTransformer(&ttemp);

            for (First(i); !Done(i); Next(i)) {
                Graphic* gr = GetGraphic(i);
		concatGraphic(gr, gr, gs, &gstemp);

		if (containsGraphic(gr, po, &gstemp)) {
		    gstemp.SetTransformer(nil);
		    return true;
		}
	    }
	    gstemp.SetTransformer(nil); /* to avoid deleting ttemp explicitly*/
	}
    }
    return false;
}
開發者ID:PNCG,項目名稱:neuron,代碼行數:26,代碼來源:picture.cpp

示例9: GetGraphic

Line* LinkView::GetLine () {
    Iterator i;
    Graphic* gr = GetGraphic();

    gr->First(i);
    return (Line*) gr->GetGraphic(i);
}
開發者ID:barak,項目名稱:ivtools-cvs,代碼行數:7,代碼來源:link.c

示例10: GetGraphic

boolean ClosedSplineView::VertexChanged () { 
    SFH_ClosedBSpline* gview = (SFH_ClosedBSpline*) GetGraphic();
    SFH_ClosedBSpline* gsubj
        = (SFH_ClosedBSpline*) GetClosedSplineComp()->GetGraphic();

    return *gview != *gsubj;
}
開發者ID:LambdaCalculus379,項目名稱:SLS-1.02,代碼行數:7,代碼來源:spline.c

示例11: GetGraphic

bool MultiLineView::VertexChanged () { 
    SF_MultiLine* gview = (SF_MultiLine*) GetGraphic();
    SF_MultiLine* gsubj =
        (SF_MultiLine*) GetMultiLineComp()->GetGraphic();

    return *gview != *gsubj;
}
開發者ID:PNCG,項目名稱:neuron,代碼行數:7,代碼來源:line.cpp

示例12: GetGraphic

void RectView::Update () {
    Graphic* rect = GetGraphic();

    IncurDamage(rect);
    *rect = *GetRectComp()->GetGraphic();
    IncurDamage(rect);
    EraseHandles();
}
開發者ID:PNCG,項目名稱:neuron,代碼行數:8,代碼來源:rect.cpp

示例13: GetGraphic

void StencilView::Update () {
    Graphic* stencil = GetGraphic();

    IncurDamage(stencil);
    *stencil = *GetStencilComp()->GetGraphic();
    IncurDamage(stencil);
    EraseHandles();
}
開發者ID:neurodebian,項目名稱:iv-hines,代碼行數:8,代碼來源:stencilcomp.cpp

示例14: GetGraphic

void EllipseView::Update () {
    Graphic* ellipse = GetGraphic();

    IncurDamage(ellipse);
    *ellipse = *GetEllipseComp()->GetGraphic();
    IncurDamage(ellipse);
    EraseHandles();
}
開發者ID:PNCG,項目名稱:neuron,代碼行數:8,代碼來源:ellipse.cpp

示例15: getCachedExtent

void Picture::getExtent (
    float& l, float& b, float& cx, float& cy, float& tol, Graphic* gs
) {
    Extent e;
    float right, top, dummy1, dummy2;

    if (extentCached()) {
	getCachedExtent(e._left, e._bottom, e._cx, e._cy, e._tol);

    } else {
	if (IsEmpty()) {
	    l = b = cx = cy = tol = 0.0;
	    return;

	} else {
            Iterator i;
            FullGraphic gstemp;
            Transformer ttemp;
            Extent te;
    
            gstemp.SetTransformer(&ttemp);
            First(i);
	    Graphic* gr = GetGraphic(i);
	    concatGSGraphic(gr, gr, gs, &gstemp);
            concatTransformerGraphic(gr, nil, gr->GetTransformer(), &ttemp);
	    getExtentGraphic(gr, e._left,e._bottom,e._cx,e._cy,e._tol,&gstemp);

            for (Next(i); !Done(i); Next(i)) {
		gr = GetGraphic(i);
		concatGSGraphic(gr, gr, gs, &gstemp);
                concatTransformerGraphic(gr,nil, gr->GetTransformer(), &ttemp);
		getExtentGraphic(
                    gr, te._left, te._bottom, te._cx, te._cy, te._tol, &gstemp
                );
		e.Merge(te);
	    }
	    cacheExtent(e._left, e._bottom, e._cx, e._cy, e._tol);
            gstemp.SetTransformer(nil); // to avoid deleting ttemp explicitly
	}
    }
    right = 2*e._cx - e._left;
    top = 2*e._cy - e._bottom;
    transformRect(e._left, e._bottom, right, top, l, b, dummy1, dummy2, gs);
    transform(e._cx, e._cy, cx, cy, gs);
    tol = e._tol;
}
開發者ID:PNCG,項目名稱:neuron,代碼行數:46,代碼來源:picture.cpp


注:本文中的GetGraphic函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。