svgtopt/SVG/SVGImpl/inc/SVGLineElementImpl.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 header file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _INC_CSVGLINEELEMENTIMPL_
       
    20 #define _INC_CSVGLINEELEMENTIMPL_
       
    21 
       
    22 #include "SVGElementImpl.h"
       
    23 #include "GfxLine2D.h"
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 class   CSvgDocumentImpl;
       
    29 
       
    30 
       
    31 /**
       
    32  * Class description goes here.
       
    33  *
       
    34  *  @lib SVGEngine.lib
       
    35  *  @since 1.0
       
    36  */
       
    37 class CSvgLineElementImpl : public CSvgElementImpl
       
    38     {
       
    39     public:
       
    40 
       
    41         // Constructor/deconstructor
       
    42 
       
    43 		/**
       
    44          * Need method description
       
    45          *
       
    46          * @since 1.0
       
    47          * @param
       
    48          * @return
       
    49          */
       
    50         static CSvgLineElementImpl*NewL(  const TUint8 aElemID,
       
    51                                       CSvgDocumentImpl* aDoc );
       
    52 
       
    53 		/**
       
    54          * Need method description
       
    55          *
       
    56          * @since 1.0
       
    57          * @param
       
    58          * @return
       
    59          */
       
    60         static CSvgLineElementImpl*NewLC(  const TUint8 aElemID,
       
    61                                        CSvgDocumentImpl* aDoc );
       
    62 
       
    63 	private:
       
    64 		/**
       
    65          * Need method description
       
    66          *
       
    67          * @since 1.0
       
    68          * @param
       
    69          * @return
       
    70          */
       
    71         void                            ConstructL(  const TUint8 aElemID  );
       
    72 
       
    73 
       
    74 
       
    75 	public:
       
    76 
       
    77 
       
    78         /**
       
    79          * Need method description
       
    80          *
       
    81          * @since 1.0
       
    82          * @param
       
    83          * @return
       
    84          */
       
    85         virtual                     ~CSvgLineElementImpl();
       
    86 
       
    87         // From MXmlElement API
       
    88 
       
    89 
       
    90         /**
       
    91          * Need method description
       
    92          *
       
    93          * @since 1.0
       
    94          * @param
       
    95          * @return
       
    96          */
       
    97         TInt                        SetAttributeL( const TDesC& aName,
       
    98                                                    const TDesC& aValue );
       
    99 
       
   100 
       
   101         /**
       
   102          * Need method description
       
   103          *
       
   104          * @since 1.0
       
   105          * @param
       
   106          * @return
       
   107          */
       
   108         TBool                       DrawL( CGfx2dGc* aGc,
       
   109                                            CSvgElementImpl* aElement );
       
   110 
       
   111 
       
   112         /**
       
   113          * Need method description
       
   114          *
       
   115          * @since 1.0
       
   116          * @param
       
   117          * @return
       
   118          */
       
   119         void                        GetBBox( TGfxRectangle2D& aBbox );
       
   120 
       
   121         /**
       
   122          * Need method description
       
   123          *
       
   124          * @since 1.0
       
   125          * @param
       
   126          * @return
       
   127          */
       
   128         virtual void                GetUnscaledBBox( TGfxRectangle2D& /*aBbox*/ );
       
   129 
       
   130         // From MXmlElementOpt API
       
   131 
       
   132         /**
       
   133          * Need method description
       
   134          *
       
   135          * @since 1.0
       
   136          * @param
       
   137          * @return
       
   138          */
       
   139         TInt                        GetAttributeFloat( const TInt aNameId,
       
   140                                                        TFloatFixPt& aValue );
       
   141 
       
   142         /**
       
   143          * Need method description
       
   144          *
       
   145          * @since 1.0
       
   146          * @param
       
   147          * @return
       
   148          */
       
   149         TInt                        SetAttributeFloatL( const TInt aNameId,
       
   150                                                         const TFloatFixPt aValue );
       
   151 
       
   152         /**
       
   153          * Return wether an svg element is displayable, such as <rect>, <circle>, or
       
   154          * an abstract element, such as <g>, <animate>.
       
   155          *
       
   156          * @since 1.0
       
   157          * @param None
       
   158          * @return ETrue if element is viewable.
       
   159          */
       
   160         TBool               IsViewable() { return ETrue; }
       
   161 
       
   162     private:
       
   163         TGfxLine2D                  iLine;
       
   164 
       
   165 
       
   166 
       
   167 
       
   168         /**
       
   169          * Need method description
       
   170          *
       
   171          * @since 1.0
       
   172          * @param
       
   173          * @return
       
   174          */
       
   175                                     CSvgLineElementImpl( CSvgDocumentImpl* aDoc );
       
   176 
       
   177     public:
       
   178 
       
   179         /**
       
   180          * Need method description
       
   181          *
       
   182          * @since 1.0
       
   183          * @param
       
   184          * @return
       
   185          */
       
   186         MXmlElement*                CloneL(MXmlElement* aParentElement);
       
   187 
       
   188 		void						Print( TBool aIsEncodeOn );
       
   189 		
       
   190     protected:
       
   191 
       
   192         /**
       
   193          * Need method description
       
   194          *
       
   195          * @since 1.0
       
   196          * @param
       
   197          * @return
       
   198          */
       
   199         void                        CopyL( CSvgLineElementImpl* aDestElement );
       
   200 
       
   201     };
       
   202 
       
   203 #endif /* _INC_CSVGLINEELEMENT_3C61A6080051_INCLUDED */