svgtopt/gfx2d/inc/GfxStroke.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 
       
    20 #ifndef GFXSTROKE_H
       
    21 #define GFXSTROKE_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 #include <fbs.h>
       
    26 #include "GfxFloatFixPt.h"
       
    27 
       
    28 
       
    29 
       
    30 class CGfxGeneralPath;
       
    31 class MGfxShape;
       
    32 class CGfx2dGc;
       
    33 
       
    34 
       
    35 /**
       
    36  *  Implementation of a Stroke.
       
    37  *
       
    38  *  @lib Gfx2D.lib
       
    39  *  @since 1.0
       
    40  */
       
    41 class TGfxStroke
       
    42     {
       
    43     public:
       
    44 
       
    45         /**
       
    46          * Constructor.  Default values for width, join, cap and miter-limit.
       
    47          *
       
    48          * @since 1.0
       
    49          * @return
       
    50          */
       
    51             TGfxStroke();
       
    52 
       
    53         /**
       
    54          * Constructor.
       
    55          *
       
    56          * @since 1.0
       
    57          * @param aStrokeWidth : width of stroke.
       
    58          * @return
       
    59          */
       
    60             TGfxStroke( TFloatFixPt aStrokeWidth );
       
    61 
       
    62         /**
       
    63          * Constructor.
       
    64          *
       
    65          * @since 1.0
       
    66          * @param aStrokeWidth : width of stroke.
       
    67          * @param aJoin : join type
       
    68          * @param aCap : cap type
       
    69          * @param aMiterLimit : miter-limit value.
       
    70          * @return
       
    71          */
       
    72             TGfxStroke( TFloatFixPt aStrokeWidth,
       
    73                                 TGfxJoinType aJoin,
       
    74                                 TGfxCapType aCap,
       
    75                                 TFloatFixPt& aMiterLimit );
       
    76 
       
    77 			void SetMiterLimit( TFloatFixPt aMiterLimit);
       
    78 			void SetJoinType( TGfxJoinType aJoin );
       
    79 			void SetCapType( TGfxCapType aCap );
       
    80 
       
    81         /**
       
    82          * Set the stroke width
       
    83          *
       
    84          * @since 1.0
       
    85          * @param aWidth : width of stroke.
       
    86          * @return
       
    87          */
       
    88             void SetStrokeWidth( TFloatFixPt aWidth );
       
    89 
       
    90         /**
       
    91          * Get the stroke width
       
    92          *
       
    93          * @since 1.0
       
    94          * @return stroke width
       
    95          */
       
    96             TFloatFixPt StrokeWidth();
       
    97 			TGfxJoinType StrokeJoin();
       
    98 			TGfxCapType StrokeCap();
       
    99 			TFloatFixPt StrokeMiterLimit();
       
   100 
       
   101     protected:
       
   102 
       
   103         /**
       
   104          * Get the stroke width, join type, cap type and miter-limit.
       
   105          *
       
   106          * @since 1.0
       
   107          * @param aStrokeWidth : width of stroke.
       
   108          * @param aJoin : join type
       
   109          * @param aCap : cap type
       
   110          * @param aMiterLimit : miter-limit value.
       
   111          * @return
       
   112          */
       
   113         void            SetVars( TFloatFixPt aStrokeWidth,
       
   114                                  TGfxJoinType aJoin,
       
   115                                  TGfxCapType aCap,
       
   116                                  const TFloatFixPt& aMiterLimit );
       
   117 
       
   118     protected:
       
   119         TFloatFixPt          iStrokeWidth;
       
   120         TGfxJoinType    iJoin;
       
   121         TGfxCapType     iCap;
       
   122         TFloatFixPt          iMiterLimit;
       
   123 
       
   124 
       
   125     private:
       
   126         friend          class CGfx2dGc;
       
   127 
       
   128     };
       
   129 
       
   130 
       
   131 #endif      // GFXSTROKE_H