// ---------------------------------------------------------------------------- void CViewBitmap::draw () { CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = pIM->getViewRenderer(); CRGBA col; if(getModulateGlobalColor()) { col.modulateFromColor (_Color, pIM->getGlobalColorForContent()); } else { col= _Color; col.A = (uint8)(((sint32)col.A*((sint32)pIM->getGlobalColorForContent().A+1))>>8); } if (_InheritGCAlpha) { // search a parent container CInterfaceGroup *gr = getParent(); while (gr) { if (gr->isGroupContainer()) { CGroupContainer *gc = static_cast<CGroupContainer *>(gr); col.A = (uint8)(((sint32)col.A*((sint32)gc->getCurrentContainerAlpha()+1))>>8); break; } gr = gr->getParent(); } }
// ------------------------------------------------------------------------------------------------ CInterfaceGroup* CInterfaceElement::getParentContainer() { CInterfaceElement *parent = this; while (parent) { CInterfaceGroup *gc = dynamic_cast< CInterfaceGroup* >( parent ); if( ( gc != NULL ) && gc->isGroupContainer() ) return gc; parent = parent->getParent(); } return NULL; }