changeset 19 | f5bac0badc7e |
parent 13 | 8f67d927ea57 |
child 29 | ac3859d43844 |
14:83d2d132aa58 | 19:f5bac0badc7e |
---|---|
23 #include <uiacceltk/HuiVisual.h> |
23 #include <uiacceltk/HuiVisual.h> |
24 #include "HuiFxConstants.h" |
24 #include "HuiFxConstants.h" |
25 #include <e32math.h> |
25 #include <e32math.h> |
26 #include "HuiCmdBufferBrush.h" |
26 #include "HuiCmdBufferBrush.h" |
27 |
27 |
28 EXPORT_C CHuiFxVisualLayer* CHuiFxVisualLayer::NewL(MHuiEffectable& aVisual) |
28 EXPORT_C CHuiFxVisualLayer* CHuiFxVisualLayer::NewL(MHuiEffectable* aVisual) |
29 { |
29 { |
30 CHuiFxVisualLayer* e = new (ELeave) CHuiFxVisualLayer(); |
30 CHuiFxVisualLayer* e = new (ELeave) CHuiFxVisualLayer(); |
31 CleanupStack::PushL(e); |
31 CleanupStack::PushL(e); |
32 e->ConstructL(aVisual); |
32 e->ConstructL(aVisual); |
33 CleanupStack::Pop(e); |
33 CleanupStack::Pop(e); |
34 return e; |
34 return e; |
35 } |
35 } |
36 |
36 |
37 EXPORT_C void CHuiFxVisualLayer::ConstructL(MHuiEffectable& aVisual) |
37 EXPORT_C void CHuiFxVisualLayer::ConstructL(MHuiEffectable* aVisual) |
38 { |
38 { |
39 #ifdef HUIFX_TRACE |
39 #ifdef HUIFX_TRACE |
40 RDebug::Print(_L("CHuiFxVisualLayer::ConstructL - 0x%x "), this); |
40 RDebug::Print(_L("CHuiFxVisualLayer::ConstructL - 0x%x "), this); |
41 #endif |
41 #endif |
42 CHuiFxLayer::ConstructL( ELayerTypeVisual ); |
42 CHuiFxLayer::ConstructL( ELayerTypeVisual ); |
43 iParameterManager = CHuiFxParameterManager::NewL(); |
43 iParameterManager = CHuiFxParameterManager::NewL(); |
44 iVisual = &aVisual; |
44 iVisual = aVisual; |
45 iSrcType = EVisualSrcVisual; |
45 iSrcType = EVisualSrcVisual; |
46 iExtBitmapFile = NULL; |
46 iExtBitmapFile = NULL; |
47 |
47 |
48 iTranslationX = 0.0f; |
48 iTranslationX = 0.0f; |
49 iTranslationY = 0.0f; |
49 iTranslationY = 0.0f; |
172 if (iExtBitmapFile) |
172 if (iExtBitmapFile) |
173 layer->iExtBitmapFile = iExtBitmapFile->AllocL(); |
173 layer->iExtBitmapFile = iExtBitmapFile->AllocL(); |
174 else |
174 else |
175 layer->iExtBitmapFile = NULL; |
175 layer->iExtBitmapFile = NULL; |
176 layer->iOpacity = iOpacity; |
176 layer->iOpacity = iOpacity; |
177 layer->iOpaqueHint = iOpaqueHint; |
|
177 return layer; |
178 return layer; |
178 } |
179 } |
179 EXPORT_C void CHuiFxVisualLayer::SetExtRect( TRect * /*aExtRect*/ ) |
180 EXPORT_C void CHuiFxVisualLayer::SetExtRect( TRect * /*aExtRect*/ ) |
180 { |
181 { |
181 // not needed.. |
182 // not needed.. |
444 } |
445 } |
445 void CHuiFxVisualLayer::FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray) |
446 void CHuiFxVisualLayer::FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray) |
446 { |
447 { |
447 aArray.Append(iSrcType); |
448 aArray.Append(iSrcType); |
448 } |
449 } |
449 |
450 |
451 TBool CHuiFxVisualLayer::FxmlUsesOpaqueHint() const |
|
452 { |
|
453 return iOpaqueHint; |
|
454 } |
|
455 |
|
456 void CHuiFxVisualLayer::SetFxmlUsesOpaqueHint(TBool aValue) |
|
457 { |
|
458 iOpaqueHint = aValue; |
|
459 } |
|
460 |
|
450 TBool CHuiFxVisualLayer::IsSemitransparent() const |
461 TBool CHuiFxVisualLayer::IsSemitransparent() const |
451 { |
462 { |
452 if (iOpacity < 1.f) |
463 if (iOpacity < 1.f) |
453 { |
464 { |
454 return ETrue; |
465 return ETrue; |