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