svgtopt/SVG/SVGImpl/inc/SvgStopElementImpl.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:  SVG Implementation source file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSVGSTOPELEMENTIMPL_H
       
    20 #define CSVGSTOPELEMENTIMPL_H
       
    21 
       
    22 #include "SVGElementImpl.h"
       
    23 
       
    24 class   CSvgDocumentImpl;
       
    25 
       
    26 /**
       
    27  * Class description goes here.
       
    28  *
       
    29  *  @lib SVGEngine.lib
       
    30  *  @since 1.0
       
    31  */
       
    32 
       
    33 class CSvgStopElementImpl : public CSvgElementImpl
       
    34                         
       
    35     {
       
    36     public:
       
    37 
       
    38         // Constructor/deconstructor
       
    39 
       
    40 
       
    41         /**
       
    42          * Need method description
       
    43          *
       
    44          * @since 1.0
       
    45          * @param 
       
    46          * @return
       
    47          */
       
    48         static CSvgStopElementImpl* NewL( const TUint8 aElemID,
       
    49                                           CSvgDocumentImpl* aDoc );
       
    50 
       
    51 
       
    52         /**
       
    53          * Need method description
       
    54          *
       
    55          * @since 1.0
       
    56          * @param 
       
    57          * @return
       
    58          */
       
    59         static CSvgStopElementImpl* NewLC( const TUint8 aElemID,
       
    60                                            CSvgDocumentImpl* aDoc );
       
    61 
       
    62 
       
    63         /**
       
    64          * Need method description
       
    65          *
       
    66          * @since 1.0
       
    67          * @param 
       
    68          * @return
       
    69          */
       
    70         virtual                     ~CSvgStopElementImpl();
       
    71 
       
    72         // From SVG DOM
       
    73 
       
    74         // From MXmlElement API
       
    75 
       
    76 
       
    77         /**
       
    78          * Need method description
       
    79          *
       
    80          * @since 1.0
       
    81          * @param 
       
    82          * @return
       
    83          */
       
    84         TInt SetAttributeL( const TDesC& aName, const TDesC& aValue );
       
    85 
       
    86         /**
       
    87          * Need method description
       
    88          *
       
    89          * @since 1.0
       
    90          * @param 
       
    91          * @return
       
    92          */
       
    93         void GetStopColor(TUint32 &aVal){aVal=iStopColor;}
       
    94         void GetOffset(TFloatFixPt &aOffset){aOffset = iOffset;}
       
    95 		void GetStopOpacity(TFloatFixPt &aStopOpacity){aStopOpacity = iStopOpacity;}
       
    96 		void SetStopColorL(TUint32 &aVal);
       
    97 				TInt GetAttributeFloat(const TInt aNameId, TFloatFixPt& aValue);
       
    98 		TInt SetAttributeFloatL(const TInt aNameId,const TFloatFixPt aValue);
       
    99 		TInt GetAttributeIntL( const TInt aNameId, TInt32& aValue );
       
   100 		TInt SetAttributeIntL( const TInt aNameId,
       
   101                                         const TInt32 aValue );
       
   102 
       
   103 		void Print( TBool aIsEncodeOn );
       
   104 		TBool IsValidValue(const TDesC& aValue);
       
   105 		TFloatFixPt iOffset;
       
   106 		
       
   107 		TBool IsValidElement() const;
       
   108     private:
       
   109         
       
   110 		TFloatFixPt iStopOpacity;
       
   111         TUint32 iStopColor;
       
   112         TBool iValidOffsetValue; // Will be set to false if the value is improper.
       
   113         /**
       
   114          * Need method description
       
   115          *
       
   116          * @since 1.0
       
   117          * @param 
       
   118          * @return
       
   119          */
       
   120         void                        ConstructL( const TUint8 aElemID );
       
   121 
       
   122 
       
   123         /**
       
   124          * Need method description
       
   125          *
       
   126          * @since 1.0
       
   127          * @param 
       
   128          * @return
       
   129          */
       
   130                                     CSvgStopElementImpl( CSvgDocumentImpl* aDoc );
       
   131 
       
   132     public:
       
   133 
       
   134     protected:
       
   135 
       
   136     };
       
   137 
       
   138 #endif /* CSVGSTOPELEMENTIMPL_H */