int RenderWindowAndSubwindow(PWINDOW pWindow) { PLIST_ENTRY pEntry; int nContinueRander = 1; switch(pWindow->wtWindowType){ case WINDOW_TYPE_BUTTON: nContinueRander = RenderButton((PWINDOW_BUTTON)pWindow); break; case WINDOW_TYPE_LIST: nContinueRander = RenderList((PWINDOW_LIST)pWindow); break; case WINDOW_TYPE_EDIT: nContinueRander = RenderEdit((PWINDOW_EDIT)pWindow); break; case WINDOW_TYPE_RICHEDIT: nContinueRander = RenderRichEdit((PWINDOW_RICHEDIT)pWindow); break; case WINDOW_TYPE_BMP: // nContinueRander = RenderBMP(pWindow); break; case WINDOW_TYPE_DROP_LIST: nContinueRander = RenderDropList((PWINDOW_DROP_LIST)pWindow); break; case WINDOW_TYPE_SHOW_BOX: nContinueRander = RenderShowBox((PWINDOW_SHOW_BOX)pWindow); break; case WINDOW_TYPE_IME: nContinueRander = RenderIMEWindow((PWINDOW_IME)pWindow); break; } if(pWindow->wChildrenHead && nContinueRander){ RenderWindowAndSubwindow(pWindow->wChildrenHead); pEntry = pWindow->wChildrenHead->leEntry.pFlink; while(pEntry!=&pWindow->wChildrenHead->leEntry){ RenderWindowAndSubwindow((PWINDOW)pEntry); pEntry = pEntry->pFlink; } } return 1; }
void JSONSerializer::RenderValue( const QVariant &vValue ) { // ----------------------------------------------------------------------- // See if this value is actually a child object // ----------------------------------------------------------------------- if ( vValue.canConvert< QObject* >()) { const QObject *pObject = vValue.value< QObject* >(); bool bSavedCommaNeeded = m_bCommaNeeded; m_bCommaNeeded = false; m_Stream << "{"; SerializeObjectProperties( pObject ); m_Stream << "}"; m_bCommaNeeded = bSavedCommaNeeded; return; } // ----------------------------------------------------------------------- // Handle QVariant special cases... // ----------------------------------------------------------------------- switch( vValue.type() ) { case QVariant::List: RenderList ( vValue.toList() ); break; case QVariant::StringList: RenderStringList( vValue.toStringList() ); break; case QVariant::Map: RenderMap ( vValue.toMap() ); break; case QVariant::DateTime: { m_Stream << "\"" << Encode( MythDate::toString( vValue.toDateTime(), MythDate::ISODate ) ) << "\""; break; } default: { m_Stream << "\"" << Encode( vValue.toString() ) << "\""; break; } } }
bool ETHScene::RenderScene(const bool roundUp, SpritePtr pOutline, SpritePtr pInvisibleEntSymbol) { m_provider->GetShaderManager()->SetParallaxIntensity(m_sceneProps.parallaxIntensity); float minHeight, maxHeight; m_provider->GetVideo()->SetBlendMode(1, GSBM_ADD); m_tempEntities.CheckTemporaryEntities(GetZAxisDirection(), m_buckets); m_provider->GetVideo()->SetZWrite(true); m_provider->GetVideo()->SetZBuffer(true); // temporary lists that will tell what to render and what to do std::list<ETHRenderEntity*> particles; std::list<ETHRenderEntity*> halos; // draw ambient pass m_provider->GetVideo()->RoundUpPosition(roundUp); RenderList(minHeight, maxHeight, pOutline, pInvisibleEntSymbol, particles, halos, roundUp); m_provider->GetVideo()->RoundUpPosition(false); // draw lights! m_provider->GetVideo()->SetZWrite(false); //RenderLightList(roundUp); m_provider->GetVideo()->SetZWrite(true); RenderParticleList(particles); m_lights.clear(); RenderTransparentLayer(halos, maxHeight, minHeight); m_provider->GetVideo()->SetZWrite(false); m_provider->GetVideo()->SetZBuffer(false); m_minSceneHeight = minHeight; m_maxSceneHeight = maxHeight; return true; }
void XmlPListSerializer::RenderValue(const QString &sName, const QVariant &vValue, bool needKey) { if ( vValue.canConvert<QObject*>()) { const QObject *pObject = vValue.value<QObject*>(); SerializePListObjectProperties(sName, pObject, needKey); return; } switch(vValue.type()) { case QVariant::List: { RenderList(sName, vValue.toList()); break; } case QVariant::StringList: { RenderStringList(sName, vValue.toStringList()); break; } case QVariant::Map: { RenderMap(sName, vValue.toMap()); break; } case QVariant::DateTime: { if (vValue.toDateTime().isValid()) { if (needKey) m_pXmlWriter->writeTextElement("key", sName); m_pXmlWriter->writeTextElement("date", vValue.toDateTime() .toUTC().toString("yyyy-MM-ddThh:mm:ssZ")); } break; } case QVariant::ByteArray: { if (!vValue.toByteArray().isNull()) { if (needKey) m_pXmlWriter->writeTextElement("key", sName); m_pXmlWriter->writeTextElement("data", vValue.toByteArray().toBase64().data()); } break; } case QVariant::Bool: { if (needKey) m_pXmlWriter->writeTextElement("key", sName); m_pXmlWriter->writeEmptyElement(vValue.toBool() ? "true" : "false"); break; } case QVariant::UInt: case QVariant::ULongLong: { if (needKey) m_pXmlWriter->writeTextElement("key", sName); m_pXmlWriter->writeTextElement("integer", QString::number(vValue.toULongLong())); break; } case QVariant::Int: case QVariant::LongLong: case QVariant::Double: { if (needKey) m_pXmlWriter->writeTextElement("key", sName); m_pXmlWriter->writeTextElement("real", QString("%1").arg(vValue.toDouble(), 0, 'f', 6)); break; } // anything else will be unrecognised, so wrap in a string case QVariant::String: default: { if (needKey) m_pXmlWriter->writeTextElement("key", sName); m_pXmlWriter->writeTextElement("string", vValue.toString()); break; } } }
// ---------------------------------------------------------------------------- // Name : Render() // Desc : // ---------------------------------------------------------------------------- void CUIHelp::Render() { CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort(); m_bVisible = TRUE; // Set web board texture pDrawPort->InitTextureData( m_ptdBaseTexture ); // Add render regions int nX, nY, nX2, nY2; // Background // Upper left nX = m_nPosX; nY = m_nPosY; nX2 = m_nPosX + m_nWidth; nY2 = m_nPosY + 28; pDrawPort->AddTexture( nX, nY, nX + 49, nY2, m_rtTitleUL.U0, m_rtTitleUL.V0, m_rtTitleUL.U1, m_rtTitleUL.V1, 0xFFFFFFFF ); // Upper middle pDrawPort->AddTexture( nX + 49, nY, nX2 - 32, nY2, m_rtTitleUM.U0, m_rtTitleUM.V0, m_rtTitleUM.U1, m_rtTitleUM.V1, 0xFFFFFFFF ); // Upper right pDrawPort->AddTexture( nX2 - 32, nY, nX2, nY2, m_rtTitleUR.U0, m_rtTitleUR.V0, m_rtTitleUR.U1, m_rtTitleUR.V1, 0xFFFFFFFF ); nY = nY2; nY2 = nY2 + 10; pDrawPort->AddTexture( nX, nY, nX + 49, nY2, m_rtBackUL.U0, m_rtBackUL.V0, m_rtBackUL.U1, m_rtBackUL.V1, 0xFFFFFFFF ); // Upper middle pDrawPort->AddTexture( nX + 49, nY, nX2 - 32, nY2, m_rtBackUM.U0, m_rtBackUM.V0, m_rtBackUM.U1, m_rtBackUM.V1, 0xFFFFFFFF ); // Upper right pDrawPort->AddTexture( nX2 - 32, nY, nX2, nY2, m_rtBackUR.U0, m_rtBackUR.V0, m_rtBackUR.U1, m_rtBackUR.V1, 0xFFFFFFFF ); // Middle left nY = m_nPosY + m_nHeight - 15; pDrawPort->AddTexture( nX, nY2, nX + 49, nY, m_rtBackML.U0, m_rtBackML.V0, m_rtBackML.U1, m_rtBackML.V1, 0xFFFFFFFF ); // Middle middle pDrawPort->AddTexture( nX + 49, nY2, nX2 - 32, nY, m_rtBackMM.U0, m_rtBackMM.V0, m_rtBackMM.U1, m_rtBackMM.V1, 0xFFFFFFFF ); // Middle right pDrawPort->AddTexture( nX2 - 32, nY2, nX2, nY, m_rtBackMR.U0, m_rtBackMR.V0, m_rtBackMR.U1, m_rtBackMR.V1, 0xFFFFFFFF ); // Lower left nY2 = m_nPosY + m_nHeight; pDrawPort->AddTexture( nX, nY, nX + 49, nY2, m_rtBackLL.U0, m_rtBackLL.V0, m_rtBackLL.U1, m_rtBackLL.V1, 0xFFFFFFFF ); // Lower middle pDrawPort->AddTexture( nX + 49, nY, nX2 - 32, nY2, m_rtBackLM.U0, m_rtBackLM.V0, m_rtBackLM.U1, m_rtBackLM.V1, 0xFFFFFFFF ); // Lower right pDrawPort->AddTexture( nX2 - 32, nY, nX2, nY2, m_rtBackLR.U0, m_rtBackLR.V0, m_rtBackLR.U1, m_rtBackLR.V1, 0xFFFFFFFF ); // Close button m_btnClose.Render(); // Text in web board // Title pDrawPort->PutTextEx( _S( 1610, "도움말" ), m_nPosX + HELP_TITLE_OFFSETX, m_nPosY + HELP_TITLE_OFFSETY, 0xFFFFFFFF ); // Render subject List RenderList(); RenderContent(); // Flush all render queue pDrawPort->FlushRenderingQueue(); pDrawPort->EndTextEx(); // Render Help Image if( m_iImageIdx>=0 ) RenderImage( m_iImageIdx ); }