svgt_plat/nvg_api/inc/NVGIcon.h
changeset 46 88edb906c587
equal deleted inserted replaced
-1:000000000000 46:88edb906c587
       
     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 NVGICON_H_
       
    20 #define NVGICON_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CNvgEngine;
       
    25 
       
    26 /*!
       
    27  * @class MNVGIcon
       
    28  *        base class for NVG icons
       
    29  */
       
    30 class MNVGIcon
       
    31     {
       
    32 public:
       
    33     
       
    34     /*!
       
    35      * @fn			SetPreserveAspectRatio
       
    36      * @brief		Sets the Aspect ration for the NVG icon
       
    37      * @return	KErrNone if success, appropriate error code on failure
       
    38      */
       
    39     virtual TInt SetPreserveAspectRatio(TInt aPreserveAspectSetting, 
       
    40                                         TInt aSmilFitSetting) = 0;
       
    41                                         
       
    42     /*!
       
    43      * @fn		Rotate
       
    44      * @brief	Rotates the icon 
       
    45      * @param aAngle	angle of rotation
       
    46      * @param aX x coordinate rotation center
       
    47      * @param aY y coordinate rotation center
       
    48      * @return	KErrNone if success, appropriate error code on failure
       
    49      */
       
    50     virtual TInt Rotate(TReal32 aAngle, TReal32 aX, TReal32 aY) __SOFTFP = 0;
       
    51 
       
    52     /*!
       
    53      * @fn		Draw
       
    54      * @brief	Draws the icon 
       
    55      * @param aSize	size of the icon
       
    56      * @param aNVGEngine NVG engine instance
       
    57      * @return	KErrNone if success, appropriate error code on failure
       
    58      */
       
    59     virtual TInt Draw(const TSize aSize, CNvgEngine * aNVGEngine) = 0;
       
    60     
       
    61     /*!
       
    62      * @fn		~MNVGIcon()
       
    63      * @brief	Destructs the icon 
       
    64      */
       
    65     virtual ~MNVGIcon();
       
    66     };
       
    67 
       
    68 #endif