equal
deleted
inserted
replaced
343 #ifdef _HUI_FX_PARSER_LOGGING |
343 #ifdef _HUI_FX_PARSER_LOGGING |
344 __ALFFXLOGSTRING("CHuiFxEffectParser::ParseNodeL - ENodeTypeVisual"); |
344 __ALFFXLOGSTRING("CHuiFxEffectParser::ParseNodeL - ENodeTypeVisual"); |
345 #endif |
345 #endif |
346 TPtrC16 extBitmap; |
346 TPtrC16 extBitmap; |
347 THuiFxVisualSrcType srcType = GetSrcTypeL( aNode, extBitmap ); |
347 THuiFxVisualSrcType srcType = GetSrcTypeL( aNode, extBitmap ); |
348 CHuiFxVisualLayer* visual = CHuiFxVisualLayer::NewL( *iVisual ); |
348 TBool opaqueHint = GetOpaqueHintL(aNode); |
|
349 CHuiFxVisualLayer* visual = CHuiFxVisualLayer::NewL( iVisual ); |
349 CleanupStack::PushL( visual ); |
350 CleanupStack::PushL( visual ); |
350 visual->SetSourceType( srcType ); |
351 visual->SetSourceType( srcType ); |
|
352 visual->SetFxmlUsesOpaqueHint( opaqueHint ); |
351 if ( srcType == EVisualSrcBitmap && extBitmap.Length() > 0 ) |
353 if ( srcType == EVisualSrcBitmap && extBitmap.Length() > 0 ) |
352 { |
354 { |
353 visual->SetExtBitmapFileL( extBitmap ); |
355 visual->SetExtBitmapFileL( extBitmap ); |
354 } |
356 } |
355 if (aLayer && aLayer->Type() == ELayerTypeGroup) |
357 if (aLayer && aLayer->Type() == ELayerTypeGroup) |
1157 #ifdef _HUI_FX_PARSER_LOGGING |
1159 #ifdef _HUI_FX_PARSER_LOGGING |
1158 __ALFFXLOGSTRING1("CHuiFxEffectParser::GetReferencePointL - return %d",ref); |
1160 __ALFFXLOGSTRING1("CHuiFxEffectParser::GetReferencePointL - return %d",ref); |
1159 #endif |
1161 #endif |
1160 return ref; |
1162 return ref; |
1161 } |
1163 } |
|
1164 TBool CHuiFxEffectParser::GetOpaqueHintL( CMDXMLNode *aNode ) |
|
1165 { |
|
1166 if (aNode->NodeType() != CMDXMLNode::EElementNode) |
|
1167 { |
|
1168 FAIL(KErrGeneral, _L("Text node expected while reading visual source type")); |
|
1169 } |
|
1170 TInt attributeIndex = ((CMDXMLElement*)aNode)->FindIndex( KLitOpaque ); |
|
1171 if (attributeIndex == KErrNotFound) |
|
1172 { |
|
1173 // If src not found, the source defaults to visual itself |
|
1174 return EFalse; |
|
1175 } |
|
1176 |
|
1177 TPtrC attributeValue; |
|
1178 TPtrC attributeName; |
|
1179 User::LeaveIfError(((CMDXMLElement*)aNode)->AttributeDetails( attributeIndex, attributeName, attributeValue )); |
|
1180 |
|
1181 if( attributeValue.Compare( KLitTrue ) == 0 ) |
|
1182 { |
|
1183 return ETrue; |
|
1184 } |
|
1185 |
|
1186 if( attributeValue.Compare( KLitFalse ) == 0 ) |
|
1187 { |
|
1188 return EFalse; |
|
1189 } |
|
1190 |
|
1191 return EFalse; |
|
1192 } |
1162 |
1193 |
1163 THuiFxVisualSrcType CHuiFxEffectParser::GetSrcTypeL( CMDXMLNode* aNode, TPtrC16& aBitmap ) |
1194 THuiFxVisualSrcType CHuiFxEffectParser::GetSrcTypeL( CMDXMLNode* aNode, TPtrC16& aBitmap ) |
1164 { |
1195 { |
1165 #ifdef _HUI_FX_PARSER_LOGGING |
1196 #ifdef _HUI_FX_PARSER_LOGGING |
1166 __ALFFXLOGSTRING1("CHuiFxEffectParser::GetSrcTypeL - 0x%x ",this); |
1197 __ALFFXLOGSTRING1("CHuiFxEffectParser::GetSrcTypeL - 0x%x ",this); |