uiacceltk/hitchcock/coretoolkit/inc/HuiFxVisualLayer.h
changeset 0 15bf7259bb7c
child 8 46927d61fef3
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef HUIFXVISUALLAYER_
       
    21 #define HUIFXVISUALLAYER_
       
    22 
       
    23 class CHuiFxParameterManager;
       
    24 
       
    25 #include "HuiFxLayer.h"
       
    26 #include "HuiFxParameter.h"
       
    27 #include "HuiCmdBufferBrush.h" // MHuiEffectable
       
    28 
       
    29 class CHuiFxVisualLayer: public CHuiFxLayer
       
    30     {
       
    31 public:
       
    32     IMPORT_C static CHuiFxVisualLayer* NewL(MHuiEffectable& aVisual);
       
    33     IMPORT_C ~CHuiFxVisualLayer();
       
    34     IMPORT_C TBool PrepareDrawL(CHuiFxEngine& aEngine);
       
    35     IMPORT_C void Draw(CHuiFxEngine& aEngine, CHuiGc& aGc, CHuiFxRenderbuffer& aTarget, CHuiFxRenderbuffer& aSource);
       
    36     IMPORT_C TBool VisualArea( TRect& aRect );
       
    37     IMPORT_C void AdvanceTime(TReal32 aElapsedTime);
       
    38     IMPORT_C TBool Changed() const;
       
    39     IMPORT_C TBool Margin(TMargins &m);
       
    40 
       
    41     IMPORT_C MHuiFxParameter* Parameter(const TDesC& aName);
       
    42     void SetSourceType( const THuiFxVisualSrcType aSrcType );
       
    43     THuiFxVisualSrcType SourceType() const;
       
    44     void SetExtBitmapFileL( TDesC& aFilename );
       
    45     TBool IsSemitransparent() const;
       
    46     
       
    47 public: // effect cache
       
    48     IMPORT_C CHuiFxVisualLayer *CloneL() const;
       
    49     IMPORT_C void SetExtRect( TRect *aExtRect );
       
    50     IMPORT_C void SetVisual( CHuiVisual *aVisual );
       
    51     IMPORT_C void SetVisual( MHuiEffectable *aVisual );
       
    52 
       
    53     void FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray);
       
    54 protected:
       
    55     IMPORT_C void ConstructL(MHuiEffectable& aVisual);
       
    56     
       
    57     void RegisterParameterL(const TDesC& aName, TRgb* aValue);
       
    58     void RegisterParameterL(const TDesC& aName, TReal32* aValue);
       
    59     
       
    60 private:
       
    61     void ApplyTransformations(CHuiGc& aGc);
       
    62     
       
    63     //CHuiVisual*         iVisual;
       
    64     MHuiEffectable *    iVisual;
       
    65     CHuiFxParameterManager* iParameterManager;
       
    66     THuiFxVisualSrcType iSrcType; // default is the visual itself
       
    67     
       
    68     TReal32             iTranslationX;
       
    69     TReal32             iTranslationY;
       
    70     TReal32             iTranslationZ;
       
    71     
       
    72     TReal32             iScaleX;
       
    73     TReal32             iScaleY;
       
    74     TReal32             iScaleZ;
       
    75     TReal32             iScaleOriginX;
       
    76     TReal32             iScaleOriginY;
       
    77     TReal32             iScaleOriginZ;
       
    78     
       
    79     TReal32             iRotationOriginX;
       
    80     TReal32             iRotationOriginY;
       
    81     TReal32             iRotationOriginZ;
       
    82     TReal32             iRotationAngle;
       
    83     TReal32             iRotationAxisX;
       
    84     TReal32             iRotationAxisY;
       
    85     TReal32             iRotationAxisZ;
       
    86     
       
    87     TReal32             iSkewAngleX;
       
    88     TReal32             iSkewAngleY;
       
    89     TReal32             iSkewAngleZ;
       
    90     TReal32             iSkewOriginX;
       
    91     TReal32             iSkewOriginY;
       
    92     TReal32             iSkewOriginZ;
       
    93     
       
    94     HBufC* iExtBitmapFile;
       
    95     TReal32 iOpacity;
       
    96 
       
    97     };
       
    98 
       
    99 #endif /*HUIFXVISUALLAYER_*/