svgtopt/SVG/SVGImpl/inc/SVGFitToViewBoxImpl.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:  SVG Implementation header file
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __INC_CSVGFITTOVIEWBOXIMPL__
       
    20 #define __INC_CSVGFITTOVIEWBOXIMPL__
       
    21 
       
    22 
       
    23 #include "GfxRectangle2D.h"
       
    24 
       
    25 #include "SVGPreserveAspectRatioImpl.h"
       
    26 #include "SVGFitToViewBox.h"
       
    27 
       
    28 
       
    29 /**
       
    30  * Class description goes here.
       
    31  *
       
    32  *  @lib SVGEngine.lib
       
    33  *  @since 1.0
       
    34  */
       
    35 class CSvgFitToViewBoxImpl : public CBase, public MSvgFitToViewBox
       
    36     {
       
    37     public:
       
    38 
       
    39         // Constructor/deconstructor
       
    40 
       
    41 
       
    42         /**
       
    43          * Need method description
       
    44          *
       
    45          * @since 1.0
       
    46          * @param
       
    47          * @return
       
    48          */
       
    49         static CSvgFitToViewBoxImpl*    NewL();
       
    50 
       
    51 
       
    52         /**
       
    53          * Need method description
       
    54          *
       
    55          * @since 1.0
       
    56          * @param
       
    57          * @return
       
    58          */
       
    59         static CSvgFitToViewBoxImpl*    NewLC();
       
    60 
       
    61 
       
    62         /**
       
    63          * Need method description
       
    64          *
       
    65          * @since 1.0
       
    66          * @param
       
    67          * @return
       
    68          */
       
    69         virtual                         ~CSvgFitToViewBoxImpl();
       
    70 
       
    71         // From SVG DOM
       
    72 
       
    73 
       
    74         /**
       
    75          * Need method description
       
    76          *
       
    77          * @since 1.0
       
    78          * @param
       
    79          * @return
       
    80          */
       
    81         void                            GetPreserveAspectRatio( MSvgPreserveAspectRatio*& aAspectRatio );
       
    82 
       
    83 
       
    84         /**
       
    85          * Need method description
       
    86          *
       
    87          * @since 1.0
       
    88          * @param
       
    89          * @return
       
    90          */
       
    91         TBool                           GetViewBox( TGfxRectangle2D& aViewBox );
       
    92 
       
    93         // Class-specified
       
    94 
       
    95 
       
    96         /**
       
    97          * Need method description
       
    98          *
       
    99          * @since 1.0
       
   100          * @param
       
   101          * @return
       
   102          */
       
   103         void                            SetPreserveAspectRatioL( TSvgPreserveAspectAlignType aAlign,
       
   104                                                                  TSvgMeetOrSliceType aMeetslice );
       
   105 
       
   106 
       
   107         /**
       
   108          * Need method description
       
   109          *
       
   110          * @since 1.0
       
   111          * @param
       
   112          * @return
       
   113          */
       
   114         void                            SetViewBoxL( TGfxRectangle2D aViewBox );
       
   115 
       
   116 
       
   117         /**
       
   118          * Need method description
       
   119          *
       
   120          * @since 1.0
       
   121          * @param
       
   122          * @return
       
   123          */
       
   124         TBool                           ViewBoxDefined();
       
   125 
       
   126 
       
   127         /**
       
   128          * Need method description
       
   129          *
       
   130          * @since 1.0
       
   131          * @param
       
   132          * @return
       
   133          */
       
   134         TBool                           SetViewBoxL( const TDesC& aAttributeName,
       
   135                                                     const TDesC& aValue );
       
   136 
       
   137 
       
   138         /**
       
   139          * Need method description
       
   140          *
       
   141          * @since 1.0
       
   142          * @param
       
   143          * @return
       
   144          */
       
   145         void                            SetWindowViewportTrans( TGfxRectangle2D aXYWH,
       
   146                                                                 TGfxAffineTransform& aTr,
       
   147                                                                 TSize aSize );
       
   148 
       
   149         /**
       
   150          * Need method description
       
   151          *
       
   152          * @since 1.0
       
   153          * @param
       
   154          * @return
       
   155          */
       
   156         CSvgFitToViewBoxImpl* CloneL();
       
   157 
       
   158     private:
       
   159 
       
   160         TGfxRectangle2D                 iViewBox;
       
   161 
       
   162         CSvgPreserveAspectRatioImpl*    iAspectRatio;
       
   163 
       
   164         TBool                           iViewBoxDefined;
       
   165 
       
   166 
       
   167         /**
       
   168          * Need method description
       
   169          *
       
   170          * @since 1.0
       
   171          * @param
       
   172          * @return
       
   173          */
       
   174         void                            ConstructL();
       
   175 
       
   176 
       
   177         /**
       
   178          * Need method description
       
   179          *
       
   180          * @since 1.0
       
   181          * @param
       
   182          * @return
       
   183          */
       
   184                                         CSvgFitToViewBoxImpl();
       
   185     };
       
   186 
       
   187 #endif /* #ifndef __INC_CSVGFITTOVIEWBOXIMPL__ */