|
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_CSVGFONTFACEELEMENTIMPL_ |
|
20 #define _INC_CSVGFONTFACEELEMENTIMPL_ |
|
21 |
|
22 #include "SVGElementImpl.h" |
|
23 #include "GfxFloatFixPt.h" |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 #ifdef SVG_FONTS_INCLUDE |
|
30 |
|
31 class CSvgDocumentImpl; |
|
32 |
|
33 |
|
34 /** |
|
35 * Class description goes here. |
|
36 * |
|
37 * @lib SVGEngine.lib |
|
38 * @since 1.0 |
|
39 */ |
|
40 class CSvgFontFaceElementImpl : public CSvgElementImpl |
|
41 { |
|
42 public: |
|
43 |
|
44 // Constructor/deconstructor |
|
45 |
|
46 /** |
|
47 * Need method description |
|
48 * |
|
49 * @since 1.0 |
|
50 * @param |
|
51 * @return |
|
52 */ |
|
53 static CSvgFontFaceElementImpl*NewL( const TUint8 aElemID, |
|
54 CSvgDocumentImpl* aDoc ); |
|
55 |
|
56 /** |
|
57 * Need method description |
|
58 * |
|
59 * @since 1.0 |
|
60 * @param |
|
61 * @return |
|
62 */ |
|
63 static CSvgFontFaceElementImpl*NewLC( const TUint8 aElemID, |
|
64 CSvgDocumentImpl* aDoc ); |
|
65 |
|
66 private: |
|
67 /** |
|
68 * Need method description |
|
69 * |
|
70 * @since 1.0 |
|
71 * @param |
|
72 * @return |
|
73 */ |
|
74 void ConstructL( const TUint8 aElemID ); |
|
75 |
|
76 |
|
77 public: |
|
78 |
|
79 /** |
|
80 * Need method description |
|
81 * |
|
82 * @since 1.0 |
|
83 * @param |
|
84 * @return |
|
85 */ |
|
86 |
|
87 TInt SetAttributeFloatL( const TInt aNameId, |
|
88 const TFloatFixPt aValue ); |
|
89 |
|
90 |
|
91 |
|
92 /** |
|
93 * Need method description |
|
94 * |
|
95 * @since 1.0 |
|
96 * @param |
|
97 * @return |
|
98 */ |
|
99 virtual ~CSvgFontFaceElementImpl(); |
|
100 |
|
101 // From SVG DOM: Empty |
|
102 |
|
103 |
|
104 /** |
|
105 * Need method description |
|
106 * |
|
107 * @since 1.0 |
|
108 * @param |
|
109 * @return |
|
110 */ |
|
111 const TDesC* GetFontFamily( ); |
|
112 |
|
113 |
|
114 /** |
|
115 * Need method description |
|
116 * |
|
117 * @since 1.0 |
|
118 * @param |
|
119 * @return |
|
120 */ |
|
121 TFloatFixPt GetAscent(); |
|
122 |
|
123 |
|
124 /** |
|
125 * Need method description |
|
126 * |
|
127 * @since 1.0 |
|
128 * @param |
|
129 * @return |
|
130 */ |
|
131 TFloatFixPt GetDescent(); |
|
132 |
|
133 |
|
134 /** |
|
135 * Need method description |
|
136 * |
|
137 * @since 1.0 |
|
138 * @param |
|
139 * @return |
|
140 */ |
|
141 TFloatFixPt GetUnitsPerEm(); |
|
142 |
|
143 |
|
144 /** |
|
145 * Need method description |
|
146 * |
|
147 * @since 1.0 |
|
148 * @param |
|
149 * @return |
|
150 */ |
|
151 TFloatFixPt GetAlphabetic(); |
|
152 |
|
153 // SVG Implementation: |
|
154 |
|
155 |
|
156 /** |
|
157 * Need method description |
|
158 * |
|
159 * @since 1.0 |
|
160 * @param |
|
161 * @return |
|
162 */ |
|
163 void SetFontFamilyL( const TDesC& aFontFamily ); |
|
164 |
|
165 |
|
166 /** |
|
167 * Removes the font-family from hash map, called in case the |
|
168 * font-face has font-face-src |
|
169 * |
|
170 * @since 3.2 |
|
171 * @param: aFontFamily-- font-family name |
|
172 * @return none |
|
173 */ |
|
174 |
|
175 void RemoveFontFamily(const TDesC& aFontFamily); |
|
176 /** |
|
177 * Need method description |
|
178 * |
|
179 * @since 1.0 |
|
180 * @param |
|
181 * @return |
|
182 */ |
|
183 void SetUnicodeRangeL( const TDesC& aUnicodeRange ); |
|
184 |
|
185 |
|
186 /** |
|
187 * Need method description |
|
188 * |
|
189 * @since 1.0 |
|
190 * @param |
|
191 * @return |
|
192 */ |
|
193 void SetAscent( TFloatFixPt aAscent ); |
|
194 |
|
195 |
|
196 /** |
|
197 * Need method description |
|
198 * |
|
199 * @since 1.0 |
|
200 * @param |
|
201 * @return |
|
202 */ |
|
203 void SetDescent( TFloatFixPt aDescent ); |
|
204 |
|
205 |
|
206 /** |
|
207 * Need method description |
|
208 * |
|
209 * @since 1.0 |
|
210 * @param |
|
211 * @return |
|
212 */ |
|
213 void SetUnitsPerEm( TFloatFixPt aUnitsPerEm ); |
|
214 |
|
215 |
|
216 /** |
|
217 * Need method description |
|
218 * |
|
219 * @since 1.0 |
|
220 * @param |
|
221 * @return |
|
222 */ |
|
223 void SetAlphabetic( TFloatFixPt aAlphabetic ); |
|
224 |
|
225 |
|
226 /** |
|
227 * Need method description |
|
228 * |
|
229 * @since 1.0 |
|
230 * @param |
|
231 * @return |
|
232 */ |
|
233 void SetUnderlinePosition( TFloatFixPt aUnderlinePosition ); |
|
234 |
|
235 |
|
236 /** |
|
237 * Need method description |
|
238 * |
|
239 * @since 1.0 |
|
240 * @param |
|
241 * @return |
|
242 */ |
|
243 void SetUnderlineThickness( TFloatFixPt aUnderlineThickness ); |
|
244 |
|
245 |
|
246 /** |
|
247 * Need method description |
|
248 * |
|
249 * @since 1.0 |
|
250 * @param |
|
251 * @return |
|
252 */ |
|
253 void SetOverlinePosition( TFloatFixPt aOverlinePosition ); |
|
254 |
|
255 |
|
256 /** |
|
257 * Need method description |
|
258 * |
|
259 * @since 1.0 |
|
260 * @param |
|
261 * @return |
|
262 */ |
|
263 void SetOverlineThickness( TFloatFixPt aOverlineThickness ); |
|
264 |
|
265 |
|
266 /** |
|
267 * Need method description |
|
268 * |
|
269 * @since 1.0 |
|
270 * @param |
|
271 * @return |
|
272 */ |
|
273 void SetStrikethroughPosition( TFloatFixPt aStrikethroughPosition ); |
|
274 |
|
275 |
|
276 /** |
|
277 * Need method description |
|
278 * |
|
279 * @since 1.0 |
|
280 * @param |
|
281 * @return |
|
282 */ |
|
283 void SetStrikethroughThickness( TFloatFixPt aStrikethroughThickness ); |
|
284 |
|
285 // From MXmlElement API |
|
286 |
|
287 /** |
|
288 * Need method description |
|
289 * |
|
290 * @since 1.0 |
|
291 * @param |
|
292 * @return |
|
293 */ |
|
294 TBool IsAttributeValid( const TDesC& aValue ); |
|
295 |
|
296 /** |
|
297 * Need method description |
|
298 * |
|
299 * @since 1.0 |
|
300 * @param |
|
301 * @return |
|
302 */ |
|
303 TInt SetAttributeL( const TDesC& aName, |
|
304 const TDesC& aValue ); |
|
305 // From CSvgElementImpl |
|
306 |
|
307 |
|
308 /** |
|
309 * Need method description |
|
310 * |
|
311 * @since 1.0 |
|
312 * @param |
|
313 * @return |
|
314 */ |
|
315 MXmlElement* CloneL(MXmlElement* aParentElement); |
|
316 |
|
317 |
|
318 /** |
|
319 * Need method description |
|
320 * |
|
321 * @since 1.0 |
|
322 * @param |
|
323 * @return |
|
324 */ |
|
325 TBool DrawL( CGfx2dGc* aGc, |
|
326 CSvgElementImpl* aElement ); |
|
327 |
|
328 // From MXmlElementOpt API |
|
329 |
|
330 |
|
331 /** |
|
332 * Need method description |
|
333 * |
|
334 * @since 1.0 |
|
335 * @param |
|
336 * @return |
|
337 */ |
|
338 TInt GetAttributeFloat( const TInt aNameId, |
|
339 TFloatFixPt& aValue ); |
|
340 |
|
341 |
|
342 /** |
|
343 * Need method description |
|
344 * |
|
345 * @since 1.0 |
|
346 * @param |
|
347 * @return |
|
348 */ |
|
349 TInt GetAttributeDes( const TInt aNameId, |
|
350 TPtrC16& aValue ); |
|
351 void Print( TBool aIsEncodeOn ); |
|
352 |
|
353 private: |
|
354 |
|
355 TFloatFixPt iAscent; |
|
356 |
|
357 TFloatFixPt iDescent; |
|
358 |
|
359 TFloatFixPt iUnitsPerEm; |
|
360 |
|
361 TFloatFixPt iAlphabetic; |
|
362 |
|
363 TFloatFixPt iUnderlinePosition; |
|
364 |
|
365 TFloatFixPt iUnderlineThickness; |
|
366 |
|
367 TFloatFixPt iOverlinePosition; |
|
368 |
|
369 TFloatFixPt iOverlineThickness; |
|
370 |
|
371 TFloatFixPt iStrikethroughPosition; |
|
372 |
|
373 TFloatFixPt iStrikethroughThickness; |
|
374 |
|
375 HBufC* iFontFamily; |
|
376 |
|
377 HBufC* iUnicodeRange; |
|
378 |
|
379 |
|
380 |
|
381 |
|
382 |
|
383 /** |
|
384 * Need method description |
|
385 * |
|
386 * @since 1.0 |
|
387 * @param |
|
388 * @return |
|
389 */ |
|
390 CSvgFontFaceElementImpl( CSvgDocumentImpl* aDoc ); |
|
391 }; |
|
392 |
|
393 #endif /* SVG_FONTS_INCLUDE */ |
|
394 |
|
395 #endif |