svgtopt/SVG/SVGImpl/inc/SVGGElementImpl.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_CSVGGELEMENTIMPL_
       
    20 #define _INC_CSVGGELEMENTIMPL_
       
    21 
       
    22 #include "SVGElementImpl.h"
       
    23 #include "GfxFloatFixPt.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 CSvgGElementImpl : public CSvgElementImpl
       
    38     {
       
    39     public:
       
    40 
       
    41         // Constructor/deconstructor
       
    42 
       
    43 
       
    44 		/**
       
    45          * Need method description
       
    46          *
       
    47          * @since 1.0
       
    48          * @param
       
    49          * @return
       
    50          */
       
    51         static CSvgGElementImpl*NewL(  const TUint8 aElemID,
       
    52                                       CSvgDocumentImpl* aDoc );
       
    53 
       
    54 		/**
       
    55          * Need method description
       
    56          *
       
    57          * @since 1.0
       
    58          * @param
       
    59          * @return
       
    60          */
       
    61         static CSvgGElementImpl*NewLC(  const TUint8 aElemID,
       
    62                                        CSvgDocumentImpl* aDoc );
       
    63 
       
    64 	private:
       
    65 		/**
       
    66          * Need method description
       
    67          *
       
    68          * @since 1.0
       
    69          * @param
       
    70          * @return
       
    71          */
       
    72         void                            ConstructL(  const TUint8 aElemID  );
       
    73 
       
    74 
       
    75 
       
    76 	public:
       
    77 
       
    78 
       
    79         /**
       
    80          * Need method description
       
    81          *
       
    82          * @since 1.0
       
    83          * @param
       
    84          * @return
       
    85          */
       
    86         virtual                 ~CSvgGElementImpl();
       
    87 
       
    88         // From MXmlElement API
       
    89 
       
    90 
       
    91         /**
       
    92          * Need method description
       
    93          *
       
    94          * @since 1.0
       
    95          * @param
       
    96          * @return
       
    97          */
       
    98         TInt                    SetAttributeL( const TDesC& aName,
       
    99                                                const TDesC& aValue );
       
   100 
       
   101         // From CSvgElementImpl
       
   102 
       
   103 
       
   104         /**
       
   105          * Need method description
       
   106          *
       
   107          * @since 1.0
       
   108          * @param
       
   109          * @return
       
   110          */
       
   111         TBool                   DrawL( CGfx2dGc* aGc,
       
   112                                        CSvgElementImpl* aElement );
       
   113 
       
   114 
       
   115         /**
       
   116          * Need method description
       
   117          *
       
   118          * @since 1.0
       
   119          * @param
       
   120          * @return
       
   121          */
       
   122         void GetBBox( TGfxRectangle2D& aBbox );
       
   123 
       
   124         /**
       
   125          * Need method description
       
   126          *
       
   127          * @since 1.0
       
   128          * @param
       
   129          * @return
       
   130          */
       
   131         virtual void GetUnscaledBBox( TGfxRectangle2D& /*aBbox*/ );
       
   132 
       
   133         // From MXmlElementOpt API
       
   134 
       
   135 
       
   136         /**
       
   137          * Need method description
       
   138          *
       
   139          * @since 1.0
       
   140          * @param
       
   141          * @return
       
   142          */
       
   143         TInt                GetAttributeFloat( const TInt aNameId,
       
   144                                                TFloatFixPt& aValue );
       
   145 
       
   146 
       
   147         /**
       
   148          * Need method description
       
   149          *
       
   150          * @since 1.0
       
   151          * @param
       
   152          * @return
       
   153          */
       
   154         // Utilities (not exported)
       
   155 
       
   156         /**
       
   157          * Need method description
       
   158          *
       
   159          * @since 1.0
       
   160          * @param
       
   161          * @return
       
   162          */
       
   163         static void         GetGroupBounding( TGfxRectangle2D& aBbox,
       
   164                                               CSvgElementImpl* aStartElement );
       
   165         /**
       
   166          * Need method description
       
   167          *
       
   168          * @since 1.0
       
   169          * @param
       
   170          * @return
       
   171          */
       
   172         static void         GetGroupBoundingUnscaled( TGfxRectangle2D& aBbox,
       
   173                                                       CSvgElementImpl* aStartElement );
       
   174     private:
       
   175 
       
   176         /**
       
   177          * Need method description
       
   178          *
       
   179          * @since 1.0
       
   180          * @param
       
   181          * @return
       
   182          */
       
   183         static void         GetGroupBoundingInternal( TFloatFixPt& aXmin,
       
   184                                                       TFloatFixPt& aYmin,
       
   185                                                       TFloatFixPt& aXmax,
       
   186                                                       TFloatFixPt& aYmax,
       
   187                                                       CSvgElementImpl* aStartElement );
       
   188         /**
       
   189          * Need method description
       
   190          *
       
   191          * @since 1.0
       
   192          * @param
       
   193          * @return
       
   194          */
       
   195         static void         GetGroupBoundingInternalUnscaled( TFloatFixPt& aXmin,
       
   196                                                               TFloatFixPt& aYmin,
       
   197                                                               TFloatFixPt& aXmax,
       
   198                                                       TFloatFixPt& aYmax,
       
   199                                                       CSvgElementImpl* aStartElement );
       
   200     private:
       
   201 
       
   202 
       
   203 
       
   204 
       
   205         /**
       
   206          * Need method description
       
   207          *
       
   208          * @since 1.0
       
   209          * @param
       
   210          * @return
       
   211          */
       
   212                             CSvgGElementImpl( CSvgDocumentImpl* aDoc );
       
   213 
       
   214     public:
       
   215 
       
   216 
       
   217         /**
       
   218          * Need method description
       
   219          *
       
   220          * @since 1.0
       
   221          * @param
       
   222          * @return
       
   223          */
       
   224         MXmlElement*        CloneL(MXmlElement* aParentElement);
       
   225 
       
   226 		void				Print( TBool aIsEncodeOn );
       
   227 		
       
   228     protected:
       
   229 
       
   230 
       
   231         /**
       
   232          * Need method description
       
   233          *
       
   234          * @since 1.0
       
   235          * @param
       
   236          * @return
       
   237          */
       
   238         void                CopyL( CSvgGElementImpl* aDestElement );
       
   239 
       
   240 
       
   241     };
       
   242 
       
   243 #endif