|
1 /* |
|
2 * Copyright (c) 2003 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: SVG Implementation header file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __INC_CSVGPATHELEMENTIMPL__ |
|
20 #define __INC_CSVGPATHELEMENTIMPL__ |
|
21 |
|
22 #include "SVGElementImpl.h" |
|
23 #include "GfxGeneralPath.h" |
|
24 |
|
25 class CSvgDocumentImpl; |
|
26 |
|
27 |
|
28 |
|
29 /** |
|
30 * Class description goes here. |
|
31 * |
|
32 * @lib SVGEngine.lib |
|
33 * @since 1.0 |
|
34 */ |
|
35 class CSvgPathElementImpl : public CSvgElementImpl |
|
36 { |
|
37 public: |
|
38 |
|
39 // Constructor/deconstructor |
|
40 |
|
41 |
|
42 /** |
|
43 * Need method description |
|
44 * |
|
45 * @since 1.0 |
|
46 * @param |
|
47 * @return |
|
48 */ |
|
49 static CSvgPathElementImpl*NewL( const TUint8 aElemID, |
|
50 CSvgDocumentImpl* aDoc ); |
|
51 |
|
52 /** |
|
53 * Need method description |
|
54 * |
|
55 * @since 1.0 |
|
56 * @param |
|
57 * @return |
|
58 */ |
|
59 static CSvgPathElementImpl*NewLC( const TUint8 aElemID, |
|
60 CSvgDocumentImpl* aDoc ); |
|
61 |
|
62 private: |
|
63 /** |
|
64 * Need method description |
|
65 * |
|
66 * @since 1.0 |
|
67 * @param |
|
68 * @return |
|
69 */ |
|
70 void ConstructL( const TUint8 aElemID ); |
|
71 |
|
72 |
|
73 |
|
74 public: |
|
75 |
|
76 |
|
77 /** |
|
78 * Need method description |
|
79 * |
|
80 * @since 1.0 |
|
81 * @param |
|
82 * @return |
|
83 */ |
|
84 ~CSvgPathElementImpl(); |
|
85 |
|
86 // From MXmlElement API |
|
87 |
|
88 |
|
89 /** |
|
90 * Need method description |
|
91 * |
|
92 * @since 1.0 |
|
93 * @param |
|
94 * @return |
|
95 */ |
|
96 TInt SetAttributeL( const TDesC& aName, |
|
97 const TDesC& aValue ); |
|
98 |
|
99 /** |
|
100 * Need method description |
|
101 * |
|
102 * @since 1.0 |
|
103 * @param |
|
104 * @return |
|
105 */ |
|
106 TBool DrawL( CGfx2dGc* aGc, |
|
107 CSvgElementImpl* aElement ); |
|
108 |
|
109 /** |
|
110 * Need method description |
|
111 * |
|
112 * @since 1.0 |
|
113 * @param |
|
114 * @return |
|
115 */ |
|
116 void GetBBox( TGfxRectangle2D& aBbox ); |
|
117 |
|
118 /** |
|
119 * Need method description |
|
120 * |
|
121 * @since 1.0 |
|
122 * @param |
|
123 * @return |
|
124 */ |
|
125 virtual void GetUnscaledBBox( TGfxRectangle2D& /*aBbox*/ ); |
|
126 |
|
127 /** |
|
128 * Need method description |
|
129 * |
|
130 * @since 1.0 |
|
131 * @param |
|
132 * @return |
|
133 */ |
|
134 TInt GetAttributeFloat( const TInt aNameId, |
|
135 TFloatFixPt& aValue ); |
|
136 |
|
137 |
|
138 /** |
|
139 * Need method description |
|
140 * |
|
141 * @since 1.0 |
|
142 * @param |
|
143 * @return |
|
144 */ |
|
145 TInt GetAttributePath( const TInt aNameId, |
|
146 CGfxGeneralPath*& aValue ); |
|
147 |
|
148 /** |
|
149 * Need method description |
|
150 * |
|
151 * @since 1.0 |
|
152 * @param |
|
153 * @return |
|
154 */ |
|
155 TInt SetAttributePathL( const TInt aNameId, |
|
156 CGfxGeneralPath* aValue ); |
|
157 |
|
158 TInt SetAttributePathRef( const TInt aNameId, |
|
159 CGfxGeneralPath*& aValue ); |
|
160 CGfxGeneralPath* GetPathAttribute(TInt aAttributeId); |
|
161 void SetPathAttribute(TInt aAttributeId, CGfxGeneralPath* aPathHandle); |
|
162 |
|
163 /** |
|
164 * Return wether an svg element is displayable, such as <rect>, <circle>, or |
|
165 * an abstract element, such as <g>, <animate>. |
|
166 * |
|
167 * @since 1.0 |
|
168 * @param None |
|
169 * @return ETrue if element is viewable. |
|
170 */ |
|
171 TBool IsViewable() { return ETrue; } |
|
172 |
|
173 CGfxGeneralPath* iShape; |
|
174 |
|
175 private: |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 /** |
|
182 * Need method description |
|
183 * |
|
184 * @since 1.0 |
|
185 * @param |
|
186 * @return |
|
187 */ |
|
188 CSvgPathElementImpl( CSvgDocumentImpl* aDoc ); |
|
189 |
|
190 public: |
|
191 |
|
192 /** |
|
193 * Need method description |
|
194 * |
|
195 * @since 1.0 |
|
196 * @param |
|
197 * @return |
|
198 */ |
|
199 MXmlElement* CloneL(MXmlElement* aParentElement); |
|
200 |
|
201 void Print( TBool aIsEncodeOn ); |
|
202 |
|
203 protected: |
|
204 |
|
205 /** |
|
206 * Need method description |
|
207 * |
|
208 * @since 1.0 |
|
209 * @param |
|
210 * @return |
|
211 */ |
|
212 void CopyL( CSvgPathElementImpl* aDestElement ); |
|
213 |
|
214 }; |
|
215 |
|
216 #endif /* _INC_CSVGPATHELEMENT_3C61A657011D_INCLUDED */ |