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