svgtopt/gfx2d/inc/GfxPaint.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 GFXPAINT_H
       
    20 #define GFXPAINT_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <fbs.h>
       
    24 
       
    25 #include "GfxFloatFixPt.h"
       
    26 #include "GfxRectangle2D.h"
       
    27 
       
    28 #include <VG/openvg.h>
       
    29 
       
    30 const TUint32 KGfxColorLinearGradient = 0x10ffffff;
       
    31 const TUint32 KGfxColorRadialGradient = 0x11ffffff;
       
    32 const TUint32 KGfxColorNull = 0x1ffffff;
       
    33 
       
    34 
       
    35 /**
       
    36  *  Abstract class to define methods for a paint implementation, such as
       
    37  *  a gradient painter.
       
    38  *
       
    39  *  @lib Gfx2D.lib
       
    40  *  @since 1.0
       
    41  */
       
    42 class MGfxPaint
       
    43     {
       
    44     public:
       
    45         /**
       
    46          * Get an array of color values for a scanline.
       
    47          * The given buffer array is filled with this color value.
       
    48          *
       
    49          * @since 1.0
       
    50          * @param aBuf : color array to holder color values
       
    51          * @param aLength : number of color values to fill.
       
    52          * @param x : x coordinate
       
    53          * @param y : y coordinate
       
    54          * @return
       
    55          */
       
    56         //virtual void    GetScanline( TUint8* aBuf,
       
    57         //                             TInt32 aLength,
       
    58         //                             TInt32 x,
       
    59         //                             TInt32 y ) = 0;
       
    60 
       
    61         /**
       
    62          * Get the "flat" color.
       
    63          *
       
    64          * @since 1.0
       
    65          * @return KGfxColorNull, if implementator is gradient paint, otherwise
       
    66          * an RGB888.
       
    67          */
       
    68         virtual TUint32 GetColor() = 0;
       
    69 
       
    70 
       
    71     
       
    72 
       
    73 		virtual void SetFill(VGPaint aFillPaint, TGfxRectangle2D& aBBox, TFloatFixPt aOpacity,void* GfxContext) = 0;
       
    74     };
       
    75 
       
    76 #endif      // GFXPAINT_H