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