svgtopt/gfx2d/inc/GfxRoundRectangleIteratorP.h
changeset 0 d46562c3d99d
equal deleted inserted replaced
-1:000000000000 0:d46562c3d99d
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Graphics Extension Library header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef GFXROUNDRECTANGLEITERATORP_H
       
    20 #define GFXROUNDRECTANGLEITERATORP_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32std.h>
       
    24 
       
    25 
       
    26 #include "GfxFloatFixPt.h"
       
    27 #include "GfxPathIterator.h"
       
    28 #include "GfxAffineTransform.h"
       
    29 
       
    30 class TGfxRoundRectangle2D;
       
    31 
       
    32 
       
    33 
       
    34 /**
       
    35  * This class provides the methods to cycle through points in a rounded rectangle.
       
    36  *
       
    37  *  @lib Gfx2D.lib
       
    38  *  @since 1.0
       
    39  */
       
    40 class CGfxRoundRectangleIteratorP : public CGfxPathIterator
       
    41     {
       
    42     public:
       
    43 
       
    44         /**
       
    45          * Constructor.
       
    46          *
       
    47          * @since 1.0
       
    48          * @param aRect : rounded rectangle to iterator through.
       
    49          * @param aTransform : transform to apply.
       
    50          * @return
       
    51          */
       
    52                                 CGfxRoundRectangleIteratorP( TGfxRoundRectangle2D* aRoundRect,
       
    53                                                              TGfxAffineTransform* aAffine );
       
    54 
       
    55 
       
    56         /**
       
    57          * Destructor.
       
    58          *
       
    59          * @since 1.0
       
    60          * @return
       
    61          */
       
    62          virtual                ~CGfxRoundRectangleIteratorP();
       
    63 
       
    64         // Implementation of MGfxPathIterator
       
    65 
       
    66         /**
       
    67          * Get the point defining the current segment.
       
    68          *
       
    69          * @since 1.0
       
    70          * @param aCoords : storage for points.
       
    71          * @return segment type.
       
    72          */
       
    73         TGfxSegType             CurrentSegment( TFloatFixPt* aCoords );
       
    74 
       
    75         /**
       
    76          * Determine if end of iterator has been reached.
       
    77          *
       
    78          * @since 1.0
       
    79          * @return true, if iterator reached end.
       
    80          */
       
    81         TBool                   IsDone();
       
    82 
       
    83         /**
       
    84          * Cycle to the next segment of the path.
       
    85          *
       
    86          * @since 1.0
       
    87          * @return
       
    88          */
       
    89         void                    NextL();
       
    90 
       
    91 
       
    92         /**
       
    93          * Convert to a polygon.
       
    94          *
       
    95          * @since 1.0
       
    96          * @param aRenderer : storage for points of polygon.
       
    97          * @param aFlatness : level of smoothness.
       
    98          * @return true, if iterator reached end.
       
    99          */
       
   100 
       
   101     private:
       
   102         TGfxRoundRectangle2D*   iRoundRect;
       
   103 
       
   104         TInt32                  iIdx;
       
   105         TFloatFixPt                  iRx, iRy;
       
   106     };
       
   107 
       
   108 #endif      // GFXROUNDRECTANGLEITERATORP_H