svgtopt/nvgdecoder/inc/NVGTLVIcon.h
changeset 0 d46562c3d99d
equal deleted inserted replaced
-1:000000000000 0:d46562c3d99d
       
     1 /*
       
     2 * Copyright (c) 2003 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:  NVG Decoder header file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NVGTLVICON_H_
       
    20 #define NVGTLVICON_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <openvg.h>
       
    24 #include "NVGIcon.h"
       
    25 
       
    26 class CNVGIconData;
       
    27 class MVGImageBinder;
       
    28 class COpenVGHandleStore;
       
    29 
       
    30 class CNVGTLVIcon :  public CBase, public MNVGIcon
       
    31     {
       
    32 private:
       
    33     CNVGTLVIcon();
       
    34     void ConstructL();
       
    35 
       
    36 public:
       
    37     enum TNVGTLVIconCommands
       
    38         {
       
    39         EPath = 0x50,
       
    40         ENone
       
    41         };
       
    42 
       
    43 public:
       
    44     static CNVGTLVIcon * NewL();
       
    45 	
       
    46     static CNVGTLVIcon * NewLC();
       
    47 	
       
    48     virtual ~CNVGTLVIcon();
       
    49     
       
    50     TInt SetPreserveAspectRatio(TInt aPreserveAspectSetting,
       
    51             TInt aSmilFitSetting);
       
    52 
       
    53     TInt Rotate(TReal32 aAngle, TReal32 aX, TReal32 aY) __SOFTFP;
       
    54 
       
    55     virtual TInt Draw(const TSize aSize, CNvgEngine * aNVGEngine);
       
    56     
       
    57     void AddDrawPathCommandL(VGPath aPath, VGPaintMode aPaintMode);
       
    58     
       
    59     void AddCommandL(const TUint8 * aCommandBuffer, TInt aCommandBufferLength);
       
    60     
       
    61     void AddCommandL(TInt8 aCommandType, const TUint8 * aCommandBuffer, TInt aCommandBufferLength);
       
    62     
       
    63     TInt DirectDrawL(const TDesC8& aBuf, const TSize& aTargetSize);
       
    64     
       
    65     TInt CreateL(const TDesC8& aBuf, const TSize& aTargetSize);
       
    66     
       
    67     void SetVGImageBinder(MVGImageBinder *aImageBinder)
       
    68         {
       
    69         iVGImageBinder = aImageBinder;
       
    70         }
       
    71 
       
    72 private:
       
    73     TInt DoDrawL(const TSize aSize);
       
    74     void UpdateClientMatrices();
       
    75     void RestoreClientMatrices();
       
    76     
       
    77     VGint               iMatrixMode;
       
    78     TReal32             iImageMatrix[9];
       
    79     TReal32             iPathMatrix[9];
       
    80     CNvgEngine *        iNVGEngine;
       
    81     CNVGIconData *      iNVGIconData;    
       
    82     MVGImageBinder *    iVGImageBinder;
       
    83     COpenVGHandleStore* iOpenVGHandles;
       
    84     };
       
    85 
       
    86 #endif
       
    87 //--------------------------------EndOfFile------------------------------------