|
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 CSVGELLIPSEELEMENTIMPL_H |
|
20 #define CSVGELLIPSEELEMENTIMPL_H |
|
21 |
|
22 #include "SVGElementImpl.h" |
|
23 #include "GfxEllipse2D.h" |
|
24 |
|
25 |
|
26 class CSvgDocumentImpl; |
|
27 |
|
28 |
|
29 /** |
|
30 * Class description goes here. |
|
31 * |
|
32 * @lib SVGEngine.lib |
|
33 * @since 1.0 |
|
34 */ |
|
35 class CSvgEllipseElementImpl : public CSvgElementImpl |
|
36 { |
|
37 public: // Constructor/deconstructor |
|
38 |
|
39 |
|
40 /** |
|
41 * Need method description |
|
42 * |
|
43 * @since 1.0 |
|
44 * @param |
|
45 * @return |
|
46 */ |
|
47 static CSvgEllipseElementImpl*NewL( const TUint8 aElemID, |
|
48 CSvgDocumentImpl* aDoc ); |
|
49 |
|
50 /** |
|
51 * Need method description |
|
52 * |
|
53 * @since 1.0 |
|
54 * @param |
|
55 * @return |
|
56 */ |
|
57 static CSvgEllipseElementImpl*NewLC( const TUint8 aElemID, |
|
58 CSvgDocumentImpl* aDoc ); |
|
59 |
|
60 private: |
|
61 /** |
|
62 * Need method description |
|
63 * |
|
64 * @since 1.0 |
|
65 * @param |
|
66 * @return |
|
67 */ |
|
68 void ConstructL( const TUint8 aElemID ); |
|
69 |
|
70 |
|
71 |
|
72 public: |
|
73 |
|
74 |
|
75 /** |
|
76 * Need method description |
|
77 * |
|
78 * @since 1.0 |
|
79 * @param |
|
80 * @return |
|
81 */ |
|
82 virtual ~CSvgEllipseElementImpl(); |
|
83 |
|
84 public: // New functions |
|
85 // From SVG DOM |
|
86 |
|
87 |
|
88 /** |
|
89 * Need method description |
|
90 * |
|
91 * @since 1.0 |
|
92 * @param |
|
93 * @return |
|
94 */ |
|
95 TFloatFixPt Rx(); |
|
96 |
|
97 |
|
98 /** |
|
99 * Need method description |
|
100 * |
|
101 * @since 1.0 |
|
102 * @param |
|
103 * @return |
|
104 */ |
|
105 TFloatFixPt Ry(); |
|
106 |
|
107 |
|
108 /** |
|
109 * Need method description |
|
110 * |
|
111 * @since 1.0 |
|
112 * @param |
|
113 * @return |
|
114 */ |
|
115 TFloatFixPt Cx(); |
|
116 |
|
117 |
|
118 /** |
|
119 * Need method description |
|
120 * |
|
121 * @since 1.0 |
|
122 * @param |
|
123 * @return |
|
124 */ |
|
125 TFloatFixPt Cy(); |
|
126 |
|
127 // SVG Implementation |
|
128 |
|
129 |
|
130 /** |
|
131 * Need method description |
|
132 * |
|
133 * @since 1.0 |
|
134 * @param |
|
135 * @return |
|
136 */ |
|
137 void SetRx( TFloatFixPt aRx ); |
|
138 |
|
139 |
|
140 /** |
|
141 * Need method description |
|
142 * |
|
143 * @since 1.0 |
|
144 * @param |
|
145 * @return |
|
146 */ |
|
147 void SetRy( TFloatFixPt aRy ); |
|
148 |
|
149 |
|
150 /** |
|
151 * Need method description |
|
152 * |
|
153 * @since 1.0 |
|
154 * @param |
|
155 * @return |
|
156 */ |
|
157 void SetCx( TFloatFixPt aCx ); |
|
158 |
|
159 |
|
160 /** |
|
161 * Need method description |
|
162 * |
|
163 * @since 1.0 |
|
164 * @param |
|
165 * @return |
|
166 */ |
|
167 void SetCy( TFloatFixPt aCy ); |
|
168 |
|
169 // Utility methods |
|
170 |
|
171 /** |
|
172 * Need method description |
|
173 * |
|
174 * @since 1.0 |
|
175 * @param |
|
176 * @return |
|
177 */ |
|
178 MXmlElement* CloneL(MXmlElement* aParentElement); |
|
179 |
|
180 /** |
|
181 * Return wether an svg element is displayable, such as <rect>, <circle>, or |
|
182 * an abstract element, such as <g>, <animate>. |
|
183 * |
|
184 * @since 1.0 |
|
185 * @param None |
|
186 * @return ETrue if element is viewable. |
|
187 */ |
|
188 TBool IsViewable() { return ETrue; } |
|
189 |
|
190 public: // From base classes |
|
191 |
|
192 // From CSvgElementImpl |
|
193 |
|
194 |
|
195 /** |
|
196 * Need method description |
|
197 * |
|
198 * @since 1.0 |
|
199 * @param |
|
200 * @return |
|
201 */ |
|
202 TBool DrawL( CGfx2dGc* aGc, |
|
203 CSvgElementImpl* aElement ); |
|
204 |
|
205 /** |
|
206 * Need method description |
|
207 * |
|
208 * @since 1.0 |
|
209 * @param |
|
210 * @return |
|
211 */ |
|
212 void GetBBox( TGfxRectangle2D& aBbox ); |
|
213 |
|
214 /** |
|
215 * Need method description |
|
216 * |
|
217 * @since 1.0 |
|
218 * @param |
|
219 * @return |
|
220 */ |
|
221 virtual void GetUnscaledBBox( TGfxRectangle2D& /*aBbox*/ ); |
|
222 |
|
223 // From MXmlElement API |
|
224 |
|
225 |
|
226 /** |
|
227 * Need method description |
|
228 * |
|
229 * @since 1.0 |
|
230 * @param |
|
231 * @return |
|
232 */ |
|
233 TInt SetAttributeL( const TDesC& aName, |
|
234 const TDesC& aValue ); |
|
235 |
|
236 |
|
237 // From MXmlElementOpt API |
|
238 |
|
239 |
|
240 /** |
|
241 * Need method description |
|
242 * |
|
243 * @since 1.0 |
|
244 * @param |
|
245 * @return |
|
246 */ |
|
247 TInt GetAttributeFloat( const TInt aNameId, |
|
248 TFloatFixPt& aValue ); |
|
249 |
|
250 /** |
|
251 * Need method description |
|
252 * |
|
253 * @since 1.0 |
|
254 * @param |
|
255 * @return |
|
256 */ |
|
257 TInt SetAttributeFloatL( const TInt aNameId, |
|
258 const TFloatFixPt aValue ); |
|
259 |
|
260 void Print( TBool aIsEncodeOn ); |
|
261 |
|
262 protected: // New functions |
|
263 |
|
264 |
|
265 /** |
|
266 * Need method description |
|
267 * |
|
268 * @since 1.0 |
|
269 * @param |
|
270 * @return |
|
271 */ |
|
272 void CopyL( CSvgEllipseElementImpl* aDestElement ); |
|
273 |
|
274 protected: // From base classes |
|
275 |
|
276 private: |
|
277 |
|
278 /** |
|
279 * C++ default constructor. |
|
280 */ |
|
281 CSvgEllipseElementImpl( CSvgDocumentImpl* aDoc ); |
|
282 |
|
283 |
|
284 private: // Data |
|
285 |
|
286 TGfxEllipse2D iEllipse; |
|
287 |
|
288 }; |
|
289 |
|
290 #endif |