svgtopt/gfx2d/inc/GfxCurveFlattenerP.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 GFXCURVEFLATTENERP_H
       
    20 #define GFXCURVEFLATTENERP_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32std.h>
       
    24 
       
    25 #include "GfxFloatFixPt.h"
       
    26 
       
    27 class TGfxAffineTransform;
       
    28 
       
    29 
       
    30 /**
       
    31  * This class provides the methods to smooth a curve defined by control points.
       
    32  *
       
    33  *  @lib Gfx2D.lib
       
    34  *  @since 1.0
       
    35  */
       
    36 class TGfxCurveFlattener
       
    37     {
       
    38     public:
       
    39 
       
    40         /**
       
    41          * Construct a TGfxCurveFlattener with a transform matrix.
       
    42          *
       
    43          * @since 1.0
       
    44          * @param aTransform : Transformation matrix.
       
    45          * @return
       
    46          */
       
    47                                 TGfxCurveFlattener( TGfxAffineTransform* aTransform );
       
    48 
       
    49         /**
       
    50          * Add a quadratic curve to this object.
       
    51          *
       
    52          * @since 1.0
       
    53          * @param aRenderer : edge point list
       
    54          * @param aCtrlPoints : control points.
       
    55          * @param aLimit : number of points to flatten curve with.
       
    56          * @return
       
    57          */
       
    58         void                    AddSubCurveQuadL( CGfxEdgeListP* aRenderer,
       
    59                                                   TFloatFixPt * aCtrlPoints,
       
    60                                                   TInt32 aLimit );
       
    61 
       
    62         /**
       
    63          * Add a cubic curve to this object.
       
    64          *
       
    65          * @since 1.0
       
    66          * @param aRenderer : edge point list
       
    67          * @param aCtrlPoints : control points.
       
    68          * @param aLimit : number of points to flatten curve with.
       
    69          * @return
       
    70          */
       
    71         void                    AddSubCurveCubicL( CGfxEdgeListP* aRenderer,
       
    72                                                    TFloatFixPt * aCtrlPoints,
       
    73                                                    TInt32 aLimit );
       
    74     private:
       
    75 
       
    76         TGfxAffineTransform*    iTransform;
       
    77     };
       
    78 
       
    79 #endif      // GFXCURVEFLATTENERP_H