svgtopt/gfx2d/inc/GfxRectangleIteratorP.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 GFXRECTANGLEITERATORP_H
       
    20 #define GFXRECTANGLEITERATORP_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32std.h>
       
    24 
       
    25 
       
    26 #include "GfxFloatFixPt.h"
       
    27 #include "GfxPathIterator.h"
       
    28 
       
    29 class TGfxAffineTransform;
       
    30 class TGfxRectangularShape;
       
    31 
       
    32 
       
    33 /**
       
    34  * This class provides the methods to cycle through points in a rectangle.
       
    35  *
       
    36  *  @lib Gfx2D.lib
       
    37  *  @since 1.0
       
    38  */
       
    39 class CGfxRectangleIteratorP : public CGfxPathIterator
       
    40     {
       
    41     public:
       
    42         /**
       
    43          * Constructor.
       
    44          *
       
    45          * @since 1.0
       
    46          * @param aRect : rectangle to iterator through.
       
    47          * @param aTransform : transform to apply.
       
    48          * @return
       
    49          */
       
    50         CGfxRectangleIteratorP( TGfxRectangularShape* aRect,
       
    51                                 TGfxAffineTransform* aTransform );
       
    52 
       
    53         /**
       
    54          * Destructor.
       
    55          *
       
    56          * @since 1.0
       
    57          * @return
       
    58          */
       
    59         virtual ~CGfxRectangleIteratorP();
       
    60 
       
    61         // Implementation of MGfxPathIterator
       
    62 
       
    63         /**
       
    64          * Get the point defining the current segment.
       
    65          *
       
    66          * @since 1.0
       
    67          * @param aCoords : storage for points.
       
    68          * @return segment type.
       
    69          */
       
    70         TGfxSegType             CurrentSegment( TFloatFixPt* aCoords );
       
    71 
       
    72         /**
       
    73          * Determine if end of iterator has been reached.
       
    74          *
       
    75          * @since 1.0
       
    76          * @return true, if iterator reached end.
       
    77          */
       
    78         TBool                   IsDone();
       
    79 
       
    80         /**
       
    81          * Cycle to the next segment of the path.
       
    82          *
       
    83          * @since 1.0
       
    84          * @return
       
    85          */
       
    86         void                    NextL();
       
    87 
       
    88         /**
       
    89          * Convert to a polygon.
       
    90          *
       
    91          * @since 1.0
       
    92          * @param aRenderer : storage for points of polygon.
       
    93          * @param aFlatness : level of smoothness.
       
    94          * @return true, if iterator reached end.
       
    95          */
       
    96 
       
    97     private:
       
    98         TGfxRectangularShape*   iRect;
       
    99         TUint32                 iIdx;
       
   100     };
       
   101 
       
   102 #endif      // GFXRECTANGLEITERATORP_H