• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetGraphic函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetGraphic函数的典型用法代码示例。如果您正苦于以下问题:C++ GetGraphic函数的具体用法?C++ GetGraphic怎么用?C++ GetGraphic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetGraphic函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: GetGraphic

void ArrowSplineView::Update () {
    ArrowOpenBSpline* amline = (ArrowOpenBSpline*) GetGraphic();
    ArrowOpenBSpline* subj = GetArrowSplineComp()->GetArrowOpenBSpline();

    IncurDamage(amline);
    *amline = *subj;
    IncurDamage(amline);
    EraseHandles();
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:9,代码来源:idarrow.c


示例17: GetBitmapComp

void BitmapView::Update () {
    Graphic* bcomp = GetBitmapComp()->GetBitmapGraphic();
    Graphic* bview = (BitmapGraphic*) GetGraphic();

    IncurDamage(bview);
    *bview = *bcomp;
    IncurDamage(bview);
    EraseHandles();
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:9,代码来源:ibbitmap.c


示例18: Picture

Graphic* Picture::Copy () {
    Iterator i;
    Picture* newPicture = new Picture(this);
    
    for (First(i); !Done(i); Next(i)) {
        newPicture->Append(GetGraphic(i)->Copy());
    }
    return newPicture;
}
开发者ID:PNCG,项目名称:neuron,代码行数:9,代码来源:picture.cpp


示例19: Transformer

Manipulator* TextOvView::CreateManipulator (
    Viewer* v, Event& e, Transformer* rel, Tool* tool
) {
    Manipulator* m = nil;
    Editor* ed = v->GetEditor();
    int tabWidth = Math::round(.5*ivinch);

    if (tool->IsA(GRAPHIC_COMP_TOOL)) {
        FontVar* fontVar = (FontVar*) ed->GetState("FontVar");
	ColorVar* colVar = (ColorVar*) ed->GetState("ColorVar");
        PSFont* font = (fontVar == nil) ? psstdfont : fontVar->GetFont();
	PSColor* fg = (colVar == nil) ? psblack : colVar->GetFgColor();
        int lineHt = font->GetLineHt();

        Painter* painter = new Painter;
        painter->FillBg(false);
        painter->SetFont(font);
	painter->SetColors(fg, nil);
	Orientation o = v->GetOrientation();
	if (o!=Rotated) 
	  painter->SetTransformer(rel);
	else {
	  rel = new Transformer(rel);
	  rel->Rotate(90.0);
	  painter->SetTransformer(rel);
	  Unref(rel);
	}

        m = new TextManip(v, painter, lineHt, tabWidth, tool);

    } else if (tool->IsA(RESHAPE_TOOL)) {
        TextGraphic* textgr = (TextGraphic*) GetGraphic();
        Painter* painter = new Painter;
        int lineHt = textgr->GetLineHeight();
        Coord xpos, ypos;
        rel = new Transformer;
        const char* text = textgr->GetOriginal();
        int size = strlen(text);
        
        textgr->TotalTransformation(*rel);
        rel->Transform(0, 0, xpos, ypos);
        painter->FillBg(false);
        painter->SetFont(textgr->GetFont());
	painter->SetColors(textgr->GetFgColor(), nil);
        painter->SetTransformer(rel);
        Unref(rel);

        m = new TextManip(
            v, text, size, xpos, ypos, painter, lineHt, tabWidth, tool
        );

    } else {
        m = OverlayView::CreateManipulator(v, e, rel, tool);
    }
    return m;
}
开发者ID:jmzaleski,项目名称:ivtools-1.2,代码行数:56,代码来源:ovtext.c


示例20: GetGraphic

void TextView::Update () {
    TextGraphic* gview = (TextGraphic*) GetGraphic();
    TextGraphic* gsubj = (TextGraphic*) GetTextComp()->GetGraphic();

    IncurDamage(gview);
    * (Graphic*) gview = * (Graphic*) gsubj;
    gview->SetLineHeight(gsubj->GetLineHeight());
    IncurDamage(gview);
    EraseHandles();
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:10,代码来源:text.c



注:本文中的GetGraphic函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetGuidStr函数代码示例发布时间:2022-05-30
下一篇:
C++ GetGraph函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap