当前位置: 首页>>代码示例>>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;未经允许,请勿转载。