本文整理汇总了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;
}
示例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;
}
示例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 );
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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;
}
示例9: GetGraphic
Line* LinkView::GetLine () {
Iterator i;
Graphic* gr = GetGraphic();
gr->First(i);
return (Line*) gr->GetGraphic(i);
}
示例10: GetGraphic
boolean ClosedSplineView::VertexChanged () {
SFH_ClosedBSpline* gview = (SFH_ClosedBSpline*) GetGraphic();
SFH_ClosedBSpline* gsubj
= (SFH_ClosedBSpline*) GetClosedSplineComp()->GetGraphic();
return *gview != *gsubj;
}
示例11: GetGraphic
bool MultiLineView::VertexChanged () {
SF_MultiLine* gview = (SF_MultiLine*) GetGraphic();
SF_MultiLine* gsubj =
(SF_MultiLine*) GetMultiLineComp()->GetGraphic();
return *gview != *gsubj;
}
示例12: GetGraphic
void RectView::Update () {
Graphic* rect = GetGraphic();
IncurDamage(rect);
*rect = *GetRectComp()->GetGraphic();
IncurDamage(rect);
EraseHandles();
}
示例13: GetGraphic
void StencilView::Update () {
Graphic* stencil = GetGraphic();
IncurDamage(stencil);
*stencil = *GetStencilComp()->GetGraphic();
IncurDamage(stencil);
EraseHandles();
}
示例14: GetGraphic
void EllipseView::Update () {
Graphic* ellipse = GetGraphic();
IncurDamage(ellipse);
*ellipse = *GetEllipseComp()->GetGraphic();
IncurDamage(ellipse);
EraseHandles();
}
示例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;
}