svgtopt/gfx2d/inc/GfxEllipseIteratorP.h
changeset 46 88edb906c587
equal deleted inserted replaced
-1:000000000000 46:88edb906c587
       
     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 GFXELLIPSEITERATORP_H
       
    20 #define GFXELLIPSEITERATORP_H
       
    21 
       
    22 
       
    23 
       
    24 #include <e32std.h>
       
    25 
       
    26 #include "GfxFloatFixPt.h"
       
    27 #include "GfxPathIterator.h"
       
    28 
       
    29 class TGfxEllipse2D;
       
    30 class TGfxAffineTransform;
       
    31 
       
    32 
       
    33 /**
       
    34  * Implementation of an ellipse iterator.
       
    35  *
       
    36  *  @lib Gfx2D.lib
       
    37  *  @since 1.0
       
    38  */
       
    39 class CGfxEllipseIteratorP : public CGfxPathIterator
       
    40     {
       
    41     public:
       
    42 
       
    43         /**
       
    44          * Construct an ellipse iterator.
       
    45          *
       
    46          * @since 1.0
       
    47          * @param aEllipse : ellipse to create iterator for.
       
    48          * @param aTransform : transform to apply to defining points.
       
    49          * @return
       
    50          */
       
    51                         CGfxEllipseIteratorP( TGfxEllipse2D* aEllipse,
       
    52                                               TGfxAffineTransform* aTransform );
       
    53 
       
    54         /**
       
    55          * Get the points defining the ellipse and the segment type.
       
    56          *
       
    57          * @since 1.0
       
    58          * @param aCoords : point storage
       
    59          * @return segment type
       
    60          */
       
    61         TGfxSegType     CurrentSegment( TFloatFixPt * aCoords );
       
    62 
       
    63         /**
       
    64          * Determine wether end of iterator has been reached.
       
    65          *
       
    66          * @since 1.0
       
    67          * @return true if end of iterator
       
    68          */
       
    69         TBool           IsDone();
       
    70 
       
    71         /**
       
    72          * Cycle to the next point of this iterator.
       
    73          *
       
    74          * @since 1.0
       
    75          * @return
       
    76          */
       
    77         void            NextL();
       
    78 
       
    79         /**
       
    80          * Write points of the ellipse to be a polygon.
       
    81          *
       
    82          * @since 1.0
       
    83          * @param aRenderer : point storage
       
    84          * @param aFlatness : number of points to generate.
       
    85          * @return
       
    86          */
       
    87 
       
    88     private:
       
    89         TGfxEllipse2D*  iEllipse;
       
    90 
       
    91         TInt32          iIdx;
       
    92     };
       
    93 
       
    94 #endif      // GFXELLIPSEITERATORP_H