|
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 #include <e32std.h> |
|
20 #include <bautils.h> |
|
21 #include <badesca.h> |
|
22 |
|
23 #include <fbs.h> |
|
24 #include <f32file.h> |
|
25 #include <s32file.h> |
|
26 |
|
27 |
|
28 |
|
29 #ifndef _INC_CSVGSCHEMADATA_ |
|
30 #define _INC_CSVGSCHEMADATA_ |
|
31 |
|
32 /*Added for binay Bytedata identification*/ |
|
33 const TUint32 KBinaryFile = 66737868; |
|
34 const TUint32 KBinaryFile2 = 66737869; |
|
35 const TUint32 KBinaryFile3 = 66737870; |
|
36 |
|
37 // Added for RGB & Float |
|
38 const TUint32 KBinaryFile4 = 66737871; |
|
39 |
|
40 const TUint16 KSvgOffset =25; |
|
41 |
|
42 //AA: Length or number type: range is 0 to +max & set using SetAttributeFloatL |
|
43 const TUint16 KAtrTextLength = 0 + KSvgOffset; |
|
44 const TUint16 KAtrWidth = 1 + KSvgOffset; |
|
45 const TUint16 KAtrHeight = 2 + KSvgOffset; |
|
46 const TUint16 KAtrR = 3 + KSvgOffset ; |
|
47 |
|
48 |
|
49 |
|
50 const TUint8 KSvgCoordAttrStartIndex = 4 + KSvgOffset; |
|
51 const TUint16 KAtrRx = 4 + KSvgOffset; |
|
52 const TUint16 KAtrRy = 5 + KSvgOffset; |
|
53 const TUint16 KAtrHorizAdvX = 6 + KSvgOffset; |
|
54 const TUint16 KAtrHorizOriginX = 7 + KSvgOffset; |
|
55 const TUint16 KAtrHorizOriginY = 8 + KSvgOffset; |
|
56 const TUint16 KAtrAscent = 9 + KSvgOffset; |
|
57 const TUint16 KAtrDescent = 10 + KSvgOffset; |
|
58 |
|
59 const TUint16 KAtrAlphabetic = 11 + KSvgOffset; |
|
60 const TUint16 KAtrUnderlinePosition = 12 + KSvgOffset; |
|
61 const TUint16 KAtrUnderlineThickness = 13 + KSvgOffset; |
|
62 const TUint16 KAtrOverlinePosition = 14 + KSvgOffset; |
|
63 const TUint16 KAtrOverlineThickness = 15 + KSvgOffset; |
|
64 const TUint16 KAtrStrikethroughPosition = 16 + KSvgOffset; |
|
65 const TUint16 KAtrStrikethroughThickness = 17 + KSvgOffset; |
|
66 const TUint16 KAtrUnitsPerEm = 18 + KSvgOffset; |
|
67 |
|
68 const TUint16 KAtrWordSpacing = 19 + KSvgOffset; |
|
69 const TUint16 KAtrLetterSpacing = 20 + KSvgOffset; |
|
70 |
|
71 |
|
72 |
|
73 //AA: Coordinate datatype: range is -max to +max & set using SetAttributeFloatL |
|
74 const TUint16 KAtrCx = 21 + KSvgOffset; |
|
75 const TUint16 KAtrCy = 22 + KSvgOffset; |
|
76 const TUint16 KAtrY = 23 + KSvgOffset; |
|
77 const TUint16 KAtrX = 24 + KSvgOffset; |
|
78 const TUint16 KAtrY1 = 25 + KSvgOffset; |
|
79 const TUint16 KAtrY2 = 26 + KSvgOffset; |
|
80 const TUint16 KAtrX1 = 27 + KSvgOffset; |
|
81 const TUint16 KAtrX2 = 28 + KSvgOffset; |
|
82 |
|
83 const TUint8 KSvgCoordAttrEndIndex = 28 + KSvgOffset; |
|
84 const TUint8 KSvgDesAttrsIndex = 29 + KSvgOffset; |
|
85 |
|
86 |
|
87 //AA: Descriptor type set using SetAttributeDesL |
|
88 const TUint16 KAtrK = 29 + KSvgOffset; |
|
89 const TUint8 KSvgFloatAttrEndIndex = 29 + KSvgOffset; |
|
90 const TUint16 KAtrG1 = 30 + KSvgOffset; |
|
91 const TUint16 KAtrG2 = 31 + KSvgOffset; |
|
92 const TUint16 KAtrU1 = 32 + KSvgOffset; |
|
93 const TUint16 KAtrU2 = 33 + KSvgOffset; |
|
94 const TUint16 KAtrUnicode = 34 + KSvgOffset; |
|
95 const TUint16 KAtrGlyphName = 35 + KSvgOffset; |
|
96 const TUint16 KAtrLang = 36 + KSvgOffset; |
|
97 const TUint8 KSvgDesAttrEndIndex = 36 + KSvgOffset; |
|
98 |
|
99 const TUint16 KAtrTextDecoration = 37 + KSvgOffset; |
|
100 const TUint16 KAtrTextAnchor = 38 + KSvgOffset; |
|
101 const TUint16 KAtrRotate = 39 + KSvgOffset; |
|
102 const TUint16 KAtrCdata = 40 + KSvgOffset; |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 const TUint16 KAtrTransform = 41 + KSvgOffset; |
|
108 const TUint16 KAtrStyle = 42 + KSvgOffset; |
|
109 const TUint16 KAtrFill = 43 + KSvgOffset; |
|
110 const TUint16 KAtrStroke = 44 + KSvgOffset; |
|
111 const TUint16 KAtrColor = 45 + KSvgOffset; |
|
112 const TUint16 KAtrFrom = 46 + KSvgOffset; |
|
113 const TUint16 KAtrTo = 47 + KSvgOffset; |
|
114 const TUint16 KAtrBy = 48 + KSvgOffset; |
|
115 const TUint16 KAtrAttributeName = 49 + KSvgOffset; |
|
116 |
|
117 |
|
118 |
|
119 const TUint8 KSvgNotHandledAttrsIndex = 50 + KSvgOffset; |
|
120 |
|
121 const TUint16 KAtrPathLength = 50 + KSvgOffset; |
|
122 const TUint16 KAtrVersion = 51 + KSvgOffset; |
|
123 const TUint16 KAtrStrokeWidth = 52 + KSvgOffset; |
|
124 const TUint16 KAtrPoints = 53 + KSvgOffset; |
|
125 const TUint16 KAtrD = 54 + KSvgOffset; |
|
126 const TUint16 KAtrType = 55 + KSvgOffset; |
|
127 const TUint16 KAtrStopColor = 56 + KSvgOffset; |
|
128 const TUint16 KAtrFx = 57 + KSvgOffset; |
|
129 const TUint16 KAtrFy = 58 + KSvgOffset; |
|
130 |
|
131 const TUint16 KAtrOffset = 59+ KSvgOffset; |
|
132 const TUint16 KAtrSpreadMethods = 60 + KSvgOffset; |
|
133 const TUint16 KAtrGradientUnits = 61 + KSvgOffset; |
|
134 const TUint16 KAtrStopOpacity = 62 + KSvgOffset; |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 // special attributes for encoding |
|
140 const TUint16 KAtrViewBox = 63 + KSvgOffset; |
|
141 const TUint16 KAtrBaseProfile = 64 + KSvgOffset; |
|
142 const TUint16 KAtrZoomAndPan = 65 + KSvgOffset; |
|
143 const TUint16 KAtrPreserveAspectRatio = 66 + KSvgOffset; |
|
144 |
|
145 const TUint8 KSvgSVGAttrEndIndex = KAtrPreserveAspectRatio; |
|
146 |
|
147 const TUint16 KAtrId = 67 + KSvgOffset; |
|
148 const TUint16 KAtrXmlBase = 68 + KSvgOffset; |
|
149 |
|
150 const TUint8 KSvgIdAndXmlAttrEndIndex = 68 + KSvgOffset; |
|
151 |
|
152 const TUint16 KAtrXmlLang = 69 + KSvgOffset; |
|
153 const TUint16 KAtrXmlSpace = 70 + KSvgOffset; |
|
154 |
|
155 const TUint8 KSvgLangAttrEndIndex = 70 + KSvgOffset; |
|
156 |
|
157 const TUint16 KAtrRequiredExtensions = 71 + KSvgOffset; |
|
158 const TUint16 KAtrRequiredFeatures = 72 + KSvgOffset; |
|
159 const TUint16 KAtrSystemLanguage = 73 + KSvgOffset; |
|
160 |
|
161 const TUint8 KSvgTestAttrEndIndex = 73 + KSvgOffset; |
|
162 |
|
163 const TUint16 KAtrDx = 74 + KSvgOffset; |
|
164 const TUint16 KAtrDy = 75 + KSvgOffset; |
|
165 const TUint16 KAtrMedia = 76 + KSvgOffset; |
|
166 const TUint16 KAtrTitle = 77 + KSvgOffset; |
|
167 |
|
168 const TUint16 KAtrXlinkactuate = 78 + KSvgOffset; |
|
169 const TUint16 KAtrXlinkarcrole = 79 + KSvgOffset; |
|
170 |
|
171 const TUint16 KAtrXlinkrole = 80 + KSvgOffset; |
|
172 const TUint16 KAtrXlinkshow = 81 + KSvgOffset; |
|
173 const TUint16 KAtrXlinktitle = 82 + KSvgOffset; |
|
174 const TUint16 KAtrXlinktype = 83 + KSvgOffset; |
|
175 const TUint16 KAtrXlinkhref = 84 + KSvgOffset; |
|
176 |
|
177 const TUint8 KSvgUriAttrEndIndex = 84 + KSvgOffset; |
|
178 |
|
179 const TUint16 KAtrBegin = 85 + KSvgOffset; |
|
180 const TUint16 KAtrDur = 86 + KSvgOffset; |
|
181 const TUint16 KAtrRepeatCount = 87 + KSvgOffset; |
|
182 const TUint16 KAtrRepeatDur = 88 + KSvgOffset; |
|
183 const TUint16 KAtrEnd = 89 + KSvgOffset; |
|
184 const TUint16 KAtrRestart = 90 + KSvgOffset; |
|
185 const TUint16 KAtrAccumulate = 91 + KSvgOffset; |
|
186 const TUint16 KAtrAdditive = 92 + KSvgOffset; |
|
187 const TUint16 KAtrKeySplines = 93 + KSvgOffset; |
|
188 const TUint16 KAtrKeyTimes = 94 + KSvgOffset; |
|
189 const TUint16 KAtrCalcMode = 95 + KSvgOffset; |
|
190 const TUint16 KAtrPath = 96 + KSvgOffset; |
|
191 const TUint16 KAtrAnimateMotion = 97 + KSvgOffset; |
|
192 const TUint16 KAtrGradientTransform = 98 + KSvgOffset; |
|
193 const TUint16 KAtrAnimateTransformAttrId = 99 + KSvgOffset; |
|
194 const TUint16 KAtrTarget = 100 + KSvgOffset; |
|
195 const TUint16 KAtrSolidOpacity = 101 + KSvgOffset; |
|
196 const TUint16 KAtrSyncBehaviorDefault = 102 + KSvgOffset; |
|
197 const TUint16 KAtrSyncToleranceDefault = 103 + KSvgOffset; |
|
198 const TUint16 KAtrSyncBehavior = 104 + KSvgOffset; |
|
199 const TUint16 KAtrSyncTolerance = 105 + KSvgOffset; |
|
200 const TUint16 KAtrSyncMaster = 106 + KSvgOffset; |
|
201 const TUint16 KAtrInitialVisibility = 107 + KSvgOffset; |
|
202 const TUint16 KAtrVolume = 108 + KSvgOffset; |
|
203 const TUint16 KAtrAudioLevel = 109 + KSvgOffset; |
|
204 |
|
205 |
|
206 #define KSVG_MAX_ATTRIBUTES KAtrAudioLevel |
|
207 #define KSVG_ATTRIBUTE_NOT_SUPPORTED KSVG_MAX_ATTRIBUTES+1 |
|
208 |
|
209 // special Ids for Animation attribute Values |
|
210 |
|
211 const TUint16 KAnimFreeze = 110 + KSvgOffset; |
|
212 |
|
213 // special Id for Embedded image XLink:href attribute . |
|
214 |
|
215 const TUint16 KXlinkhrefImageEmbedded = 111 + KSvgOffset; |
|
216 |
|
217 // special Id for multiple end times.Used for the Binary compatibility of the encoder |
|
218 |
|
219 const TUint16 KMultipleEndTime = 112 + KSvgOffset; |
|
220 const TUint16 KAtrMediaAnimationId = 113 + KSvgOffset; |
|
221 |
|
222 const TUint16 KAtrAudioId = 114 + KSvgOffset; |
|
223 |
|
224 |
|
225 #define KSVG_ANIMATE_ELEMFLAG KAtrAttributeName |
|
226 #define KSVG_SET_ELEMFLAG KAtrAttributeName |
|
227 #define KSVG_ANIMATETRANSFORM_ELEMFLAG KAtrSVGTrf |
|
228 #define KSVG_CIRCLE_ELEMFLAG KAtrR |
|
229 #define KSVG_ELLIPSE_ELEMFLAG KAtrSVGElp |
|
230 #define KSVG_RECT_ELEMFLAG KAtrSVGRec |
|
231 #define KSVG_IMAGE_ELEMFLAG KAtrSVGRec |
|
232 #define KSVG_HKERN_ELEMFLAG KAtrK |
|
233 #define KSVG_PATH_ELEMFLAG KAtrD |
|
234 #define KSVG_POLYLINE_ELEMFLAG KAtrPoints |
|
235 #define KSVG_AMINATEMO_ELEMFLAG KAtrSVGAmo |
|
236 |
|
237 const TUint16 KAtrSVGRec = 120 + KSvgOffset; |
|
238 const TUint16 KAtrSVGElp = 121 + KSvgOffset; |
|
239 const TUint16 KAtrSVGTrf = 122 + KSvgOffset; |
|
240 const TUint16 KAtrSVGAmo = 123 + KSvgOffset; |
|
241 const TUint16 KAtrToBy = 124 + KSvgOffset; |
|
242 const TUint16 KAtrAdditiveSet = 125 + KSvgOffset; |
|
243 |
|
244 |
|
245 |
|
246 const TUint16 KTiny = 0; |
|
247 |
|
248 // Display Enumeration Constants. take care |
|
249 const TUint KDisplayEnumNone = 16; |
|
250 const TUint KPresentationAttrDisplay = 10; |
|
251 |
|
252 const TUint16 KAtrUnicodeRange = 135 + KSvgOffset; |
|
253 const TUint16 KAtrValues = 138 + KSvgOffset; |
|
254 |
|
255 |
|
256 // SPECIAL (APPLICATION DEFINED) ATTRIBUTE CONSTANTS |
|
257 const TUint16 KAtrData = KAtrD; // So KAtrData can still be used |
|
258 const TUint16 KAtrRadius = KAtrR; // So KAtrRadius can still be used |
|
259 |
|
260 const TUint16 KAtrRefX = 1001; |
|
261 const TUint16 KAtrRefY = 1002; |
|
262 const TUint16 KAtrAnimMotionMatrixIndex = 5000; |
|
263 const TUint16 KAtrAnimTransformMatrixIndex = 5001; |
|
264 |
|
265 //error values added for forwward reference support in animation and use elements |
|
266 const TInt KErrReferencedElementNotFound = -1000; |
|
267 const TInt KErrAnimateReferenceElementNotFound = -1001; |
|
268 |
|
269 // start of new element in encoding. |
|
270 const TUint16 KStartNewElem = 1000; |
|
271 |
|
272 // SVG TINY DEFINED ENUMERATIONS |
|
273 const TUint16 KEnumPercent = 0; // '%' sign |
|
274 const TUint16 KEnum100 = 1; |
|
275 const TUint16 KEnum200 = 2; |
|
276 const TUint16 KEnum300 = 3; |
|
277 const TUint16 KEnum400 = 4; |
|
278 const TUint16 KEnum500 = 5; |
|
279 const TUint16 KEnum600 = 6; |
|
280 const TUint16 KEnum700 = 7; |
|
281 const TUint16 KEnum800 = 8; |
|
282 const TUint16 KEnum900 = 9; |
|
283 const TUint16 KEnumAlways = 10; |
|
284 const TUint16 KEnumAuto = 11; |
|
285 const TUint16 KEnumBevel = 12; |
|
286 const TUint16 KEnumBlink = 13; |
|
287 const TUint16 KEnumBlock = 14; |
|
288 const TUint16 KEnumBold = 15; |
|
289 const TUint16 KEnumBolder = 16; |
|
290 const TUint16 KEnumButt = 17; |
|
291 const TUint16 KEnumCdata = 18; |
|
292 const TUint16 KEnumCm = 19; |
|
293 const TUint16 KEnumCompact = 20; |
|
294 const TUint16 KEnumCondensed = 21; |
|
295 const TUint16 KEnumCss = 22; |
|
296 const TUint16 KEnumDasharray = 23; |
|
297 const TUint16 KEnumDisable = 24; |
|
298 const TUint16 KEnumDiscrete = 25; |
|
299 const TUint16 KEnumEnd = 26; |
|
300 const TUint16 KEnumEvenodd = 27; |
|
301 const TUint16 KEnumExpanded = 28; |
|
302 const TUint16 KEnumExtraCondensed = 29; |
|
303 const TUint16 KEnumExtraExpanded = 30; |
|
304 const TUint16 KEnumFreeze = 31; |
|
305 const TUint16 KEnumHidden = 32; |
|
306 const TUint16 KEnumIn = 33; |
|
307 const TUint16 KEnumInherit = 34; |
|
308 const TUint16 KEnumInline = 35; |
|
309 const TUint16 KEnumInlineTable = 36; |
|
310 const TUint16 KEnumInterger = 37; |
|
311 const TUint16 KEnumItalic = 38; |
|
312 const TUint16 KEnumLenght = 39; |
|
313 const TUint16 KEnumLighter = 40; |
|
314 const TUint16 KEnumLinear = 41; |
|
315 const TUint16 KEnumLineThrough = 42; |
|
316 const TUint16 KEnumListItem = 43; |
|
317 const TUint16 KEnumMagnify = 44; |
|
318 const TUint16 KEnumMarker = 45; |
|
319 const TUint16 KEnumMiddle = 46; |
|
320 const TUint16 KEnumMiter = 47; |
|
321 const TUint16 KEnumMm = 48; |
|
322 const TUint16 KEnumNarrower = 49; |
|
323 const TUint16 KEnumNever = 50; |
|
324 const TUint16 KEnumNone = 51; |
|
325 const TUint16 KEnumNonzero = 52; |
|
326 const TUint16 KEnumNormal = 53; |
|
327 const TUint16 KEnumOblique = 54; |
|
328 const TUint16 KEnumOverline = 55; |
|
329 const TUint16 KEnumPaced = 56; |
|
330 const TUint16 KEnumPc = 57; |
|
331 const TUint16 KEnumPt = 58; |
|
332 const TUint16 KEnumPx = 59; |
|
333 const TUint16 KEnumRemove = 60; |
|
334 const TUint16 KEnumReplace = 61; |
|
335 const TUint16 KEnumRotate = 62; |
|
336 const TUint16 KEnumRound = 63; |
|
337 const TUint16 KEnumRunIn = 64; |
|
338 const TUint16 KEnumScale = 65; |
|
339 const TUint16 KEnumSemiCondensed = 66; |
|
340 const TUint16 KEnumSemiExpanded = 67; |
|
341 const TUint16 KEnumSkewX = 68; |
|
342 const TUint16 KEnumSkewY = 69; |
|
343 const TUint16 KEnumSpline = 70; |
|
344 const TUint16 KEnumSquare = 71; |
|
345 const TUint16 KEnumStart = 72; |
|
346 const TUint16 KEnumSum = 73; |
|
347 const TUint16 KEnumTable = 74; |
|
348 const TUint16 KEnumTableCaption = 75; |
|
349 const TUint16 KEnumTableCell = 76; |
|
350 const TUint16 KEnumTableColumn = 77; |
|
351 const TUint16 KEnumTableColumnGroup = 78; |
|
352 const TUint16 KEnumTableFooterGroup = 79; |
|
353 const TUint16 KEnumTableHeaderGroup = 80; |
|
354 const TUint16 KEnumTableRow = 81; |
|
355 const TUint16 KEnumTableRowGroup = 82; |
|
356 const TUint16 KEnumTranslate = 83; |
|
357 const TUint16 KEnumUltraCondensed = 84; |
|
358 const TUint16 KEnumUltraExpanded = 85; |
|
359 const TUint16 KEnumUnderline = 86; |
|
360 const TUint16 KEnumVisible = 87; |
|
361 const TUint16 KEnumWhenNotActive = 88; |
|
362 const TUint16 KEnumWider = 89; |
|
363 const TUint16 KEnumXMaxYMax = 90; |
|
364 const TUint16 KEnumXMaxYMid = 91; |
|
365 const TUint16 KEnumXMaxYMin = 92; |
|
366 const TUint16 KEnumXMidYMax = 93; |
|
367 const TUint16 KEnumXMidYMid = 94; |
|
368 const TUint16 KEnumXMidYMin = 95; |
|
369 const TUint16 KEnumXMinYMax = 96; |
|
370 const TUint16 KEnumXMinYMid = 97; |
|
371 const TUint16 KEnumXMinYMin = 98; |
|
372 const TUint16 KEnumXml = 99; |
|
373 |
|
374 // Temporary |
|
375 const TInt KSvgTinyArraySize = 210; |
|
376 |
|
377 /* List of Elements */ |
|
378 |
|
379 |
|
380 //const TUint8 KSvgAnimElemsStartIndex = 34; |
|
381 //const TUint8 KSvgAnimElemsEndIndex = 38; |
|
382 |
|
383 const TUint8 KSvgNoBoundBoxElemsStartIndex = 0; |
|
384 const TUint8 KSvgNoBoundBoxElemsEndIndex = 18; |
|
385 |
|
386 const TUint8 KSvgAllGElemsStartIndex = 3; |
|
387 const TUint8 KSvgAllGElemsSubStartIndex = 4; |
|
388 const TUint8 KSvgAllGElemsEndIndex = 7; |
|
389 |
|
390 /* Media Elements bound indexes */ |
|
391 const TUint8 KSvgMediaElemsStartIndex = 47; |
|
392 const TUint8 KSvgMediaElemsEndIndex = 48; |
|
393 |
|
394 const TUint8 KSvgSvgElement = 0; |
|
395 |
|
396 const TUint8 KSvgAltglyphElement = 1; |
|
397 const TUint8 KSvgAltglyphdefElement = 2; |
|
398 |
|
399 const TUint8 KSvgDefsElement = 3; |
|
400 const TUint8 KSvgDescElement = 4; |
|
401 |
|
402 const TUint8 KSvgMetadataElement = 6; |
|
403 const TUint8 KSvgTitleElement = 7; |
|
404 |
|
405 const TUint8 KSvgFontfacenameElement = 8; |
|
406 const TUint8 KSvgFontfacesrcElement = 9; |
|
407 const TUint8 KSvgFontfaceuriElement = 10; |
|
408 const TUint8 KSvgGElement = 11; |
|
409 const TUint8 KSvgGlyphrefElement = 12; |
|
410 const TUint8 KSvgVkernElement = 13; |
|
411 // Moved to end of element type list to use its own class |
|
412 // Types 1-16 uses CSvgGElementImpl as container |
|
413 // const TUint8 KSvgScriptElement = 14; |
|
414 const TUint8 KSvgSwitchElement = 15; |
|
415 |
|
416 const TUint8 KSvgViewElement = 16; |
|
417 |
|
418 const TUint8 KSvgHkernElement = 17; |
|
419 |
|
420 const TUint8 KSvgAElement = 18; |
|
421 const TUint8 KSvgFontElement = 19; |
|
422 const TUint8 KSvgFontfaceElement = 20; |
|
423 const TUint8 KSvgGlyphElement = 21; |
|
424 const TUint8 KSvgImageElement = 22; |
|
425 const TUint8 KSvgMissingglyphElement = 23; |
|
426 const TUint8 KSvgStyleElement = 24; |
|
427 const TUint8 KSvgTextElement = 25; |
|
428 const TUint8 KSvgUseElement = 26; |
|
429 const TUint8 KSvgCircleElement = 27; |
|
430 const TUint8 KSvgEllipseElement = 28; |
|
431 const TUint8 KSvgLineElement = 29; |
|
432 const TUint8 KSvgPathElement = 30; |
|
433 const TUint8 KSvgPolygonElement = 31; |
|
434 const TUint8 KSvgPolylineElement = 32; |
|
435 const TUint8 KSvgRectElement = 33; |
|
436 const TUint8 KSvgAnimateElement = 34; |
|
437 const TUint8 KSvgAnimateColorElement = 35; |
|
438 const TUint8 KSvgAnimateMotionElement = 36; |
|
439 const TUint8 KSvgAnimateTransformElement = 37; |
|
440 const TUint8 KSvgSetElement = 38; |
|
441 const TUint8 KSvgMpathElement = 39; |
|
442 const TUint8 KSvgLinearGradientElement = 40; |
|
443 const TUint8 KSvgRadialGradientElement = 41; |
|
444 const TUint8 KSvgStopElement = 42; |
|
445 const TUint8 KSvgScriptElement = 43; |
|
446 const TUint8 KSvgTextAreaElement = 44; |
|
447 const TUint8 KSvgDiscardElement = 45; |
|
448 const TUint8 KSvgSolidColorElement = 46; |
|
449 //const TUint8 KSvgAnimationElement = 47; |
|
450 const TUint8 KSvgMediaAnimationElement = 47; |
|
451 const TUint8 KSvgAudioElement = 48; |
|
452 const TUint8 KSvgForeignObjectElement = 49; |
|
453 |
|
454 // signs the present of Cdata |
|
455 const TUint8 KCDataPresent = 253; |
|
456 // end of element index |
|
457 const TUint8 KEndElemIndex = 254; |
|
458 const TUint8 KEndSvgFile = 255; |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 /* List of Data Types */ |
|
464 const TInt KSvgTypeInteger = 0; |
|
465 const TInt KSvgTypeNumber = 1; |
|
466 const TInt KSvgTypeColor = 2; |
|
467 const TInt KSvgTypeLength = 3; |
|
468 //const TInt KSvgTypeStr = 4; |
|
469 //const TInt KSvgTypeTime = 5; |
|
470 //const TInt KSvgTypeCor = 6; |
|
471 |
|
472 const TInt KSvgTypePath = 7; |
|
473 const TInt KSvgTypeId = 8; |
|
474 const TInt KSvgTypeUriId = 9; |
|
475 const TInt KSvgTypeValue = 10; |
|
476 const TInt KSvgTypeRDur = 11; |
|
477 const TInt KSvgTypeRCount = 12; |
|
478 const TInt KSvgTypeList = 13; |
|
479 const TInt KSvgTypeStyle = 14; |
|
480 const TInt KSvgTypeViewBox = 15; |
|
481 const TInt KSvgTypePAR = 16; |
|
482 const TInt KSvgTypeCorl = 17; |
|
483 |
|
484 |
|
485 /* Transform Types */ |
|
486 |
|
487 const TInt KSvgTypeTransform = 30; |
|
488 const TInt KSvgTypeTranslate = 31; |
|
489 const TInt KSvgTypeRotate = 32; |
|
490 const TInt KSvgTypeScale = 33; |
|
491 const TInt KSvgTypeSkewX = 34; |
|
492 const TInt KSvgTypeSkewY = 35; |
|
493 const TInt KSvgType2DMatrix = 36; |
|
494 |
|
495 /* Only Enumarated SVGT ATTRIBUTES */ |
|
496 const TInt KSvgTypeEnum = 49; |
|
497 const TInt KSvgTypeAccumulate = 50; |
|
498 const TInt KSvgTypeAdditive = 51; |
|
499 const TInt KSvgTypeCalcMode = 52; |
|
500 const TInt KSvgTypeDisplay = 53; |
|
501 const TInt KSvgTypeFill = 54; |
|
502 const TInt KSvgTypeFillRule = 55; |
|
503 const TInt KSvgTypeFontFamily = 56; |
|
504 const TInt KSvgTypeFontSize = 57;// Break in series due to redefinition originally |
|
505 const TInt KSvgTypeFontStyle = 59; |
|
506 const TInt KSvgTypeFontWeight = 60; |
|
507 const TInt KSvgTypeRestart = 61; |
|
508 const TInt KSvgTypeStrokeDasharray = 62; |
|
509 const TInt KSvgTypeStrokeDashoffset = 63; |
|
510 |
|
511 const TInt KSvgTypeStrokeLinecap = 64; |
|
512 const TInt KSvgTypeStrokeLinejoin= 65; |
|
513 const TInt KSvgTypeStrokeMiterlimit = 66; |
|
514 const TInt KSvgTypeStrokeWidth = 67; |
|
515 const TInt KSvgTypeType = 68; |
|
516 const TInt KSvgTypeVisibility = 69; |
|
517 const TInt KSvgTypeZoomAndPan = 70; |
|
518 const TInt KSvgTypeAttributeType = 71; |
|
519 const TInt KSvgTypeTo = 72; |
|
520 const TInt KSvgTypeTextAnchor = 73; |
|
521 const TInt KSvgTypeTextDecoration= 74; |
|
522 const TInt KSvgTypeAlignmentBaseline = 75; |
|
523 const TInt KSvgTypeBaselineShift = 76; |
|
524 const TInt KSvgTypeClipRule = 77; |
|
525 const TInt KSvgTypeColorInterpolation = 78; |
|
526 const TInt KSvgTypeCursor = 79; |
|
527 const TInt KSvgTypeDirection = 80; |
|
528 const TInt KSvgTypeDominantBaseline = 81; |
|
529 const TInt KSvgTypeFontStretch = 82; |
|
530 const TInt KSvgTypeFontVariant = 83; |
|
531 const TInt KSvgTypeImageRendering= 84; |
|
532 const TInt KSvgTypeOverflow = 85; |
|
533 const TInt KSvgTypePointerEvents = 86; |
|
534 const TInt KSvgTypeShapeRendering= 87; |
|
535 const TInt KSvgTypeTextRendering = 88; |
|
536 const TInt KSvgTypeUnicodeBidi = 89; |
|
537 const TInt KSvgTypeWritingMode = 90; |
|
538 const TInt KSvgTypeMaskUnits = 91; |
|
539 const TInt KSvgTypeMode = 92; |
|
540 const TInt KSvgTypeOperator = 93; |
|
541 const TInt KSvgTypeMethod = 94; |
|
542 const TInt KSvgTypeSpacing = 95; |
|
543 const TInt KSvgTypeRenderingIntent= 96; |
|
544 const TInt KSvgTypeSpreadMethod = 97; |
|
545 const TInt KSvgTypeOpacity = 98; |
|
546 const TInt KSvgTypeGradientUnits = 99; |
|
547 |
|
548 |
|
549 |
|
550 |
|
551 #define KCSS_ATTR_FILL 0 |
|
552 #define KCSS_ATTR_STROKE 1 |
|
553 #define KCSS_ATTR_STROKEWIDTH 2 |
|
554 #define KCSS_ATTR_VISIBILITY 3 |
|
555 #define KCSS_ATTR_FONTFAMILY 4 |
|
556 #define KCSS_ATTR_FONTSIZE 5 |
|
557 #define KCSS_ATTR_FONTSTYLE 6 |
|
558 #define KCSS_ATTR_FONTWEIGHT 7 |
|
559 #define KCSS_ATTR_STROKE_DASHARRAY 8 |
|
560 #define KCSS_ATTR_DISPLAY 9 |
|
561 #define KCSS_ATTR_FILLRULE 10 |
|
562 #define KCSS_ATTR_STROKE_LINECAP 11 |
|
563 #define KCSS_ATTR_STROKE_LINEJOIN 12 |
|
564 #define KCSS_ATTR_STROKE_DASHOFFSET 13 |
|
565 #define KCSS_ATTR_STROKE_MITERLIMIT 14 |
|
566 #define KCSS_ATTR_COLOR 15 |
|
567 #define KCSS_ATTR_TEXTANCHOR 16 |
|
568 #define KCSS_ATTR_TEXTDECORATION 17 |
|
569 #define KCSS_ATTR_COLORINTERPOLATION 18 |
|
570 #define KCSS_ATTR_COLORRENDERING 19 |
|
571 #define KCSS_ATTR_LETTERSPACING 20 |
|
572 #define KCSS_ATTR_WORDSPACING 21 |
|
573 |
|
574 #define KCSS_ATTR_FILL_OPACITY 22 |
|
575 #define KCSS_ATTR_STROKE_OPACITY 23 |
|
576 #define KCSS_ATTR_GROUP_OPACITY 24 |
|
577 |
|
578 #define KCSS_ATTR_FONT 25 |
|
579 #define KCSS_MAX_ATTR 25 |
|
580 |
|
581 const TInt KInherit = 5; |
|
582 // number of color names supported by SVGT |
|
583 const TInt KMaxColors = 17; |
|
584 |
|
585 enum TAttributeType |
|
586 { |
|
587 EInteger = 0, |
|
588 EFloat, |
|
589 EString, |
|
590 EList, |
|
591 EUndefinedType |
|
592 }; |
|
593 |
|
594 |
|
595 /** |
|
596 * Class description goes here. |
|
597 * |
|
598 * @lib SVGEngine.lib |
|
599 * @since 1.0 |
|
600 */ |
|
601 class CSvgSchemaData : public CBase |
|
602 { |
|
603 private: |
|
604 |
|
605 |
|
606 /** |
|
607 * Need method description |
|
608 * |
|
609 * @since 1.0 |
|
610 * @param |
|
611 * @return |
|
612 */ |
|
613 void ConstructL(); |
|
614 |
|
615 /** |
|
616 * Need method description |
|
617 * |
|
618 * @since 1.0 |
|
619 * @param |
|
620 * @return |
|
621 */ |
|
622 CSvgSchemaData(); |
|
623 public: |
|
624 |
|
625 /** |
|
626 * Need method description - GetSVGTAttributeId |
|
627 * |
|
628 * @since 1.0 |
|
629 * @param aAttrName |
|
630 * @return |
|
631 */ |
|
632 static TUint16 GetSVGTAttributeId(const TDesC& aAttrName); |
|
633 |
|
634 /** |
|
635 * Need method description - GetSVGElementId |
|
636 * |
|
637 * @since 1.0 |
|
638 * @param aElement |
|
639 * @return |
|
640 */ |
|
641 static TInt GetSVGElementId(const TDesC& aElement); |
|
642 |
|
643 /** |
|
644 * Need method description - GetPresentationAttributeId |
|
645 * |
|
646 * @since 1.0 |
|
647 * @param aElement |
|
648 * @return |
|
649 */ |
|
650 static TInt GetPresentationAttributeId(const TDesC& aElement); |
|
651 |
|
652 /** |
|
653 * Get the type of the given attribute string |
|
654 * |
|
655 * @since 1.0 |
|
656 * @param aAttrName |
|
657 * @return type for attribute-name |
|
658 */ |
|
659 static TAttributeType GetAttributeType( const TDesC& aAttrName ); |
|
660 |
|
661 /** |
|
662 * Need method description - FindSpreadMethod |
|
663 * returns the integer enum value for the spread method type |
|
664 * @since 1.0 |
|
665 * @param aElement |
|
666 * @return |
|
667 */ |
|
668 TInt FindSpreadMethod(const TDesC& aElement); |
|
669 /** |
|
670 * Need method description - FindFontStyle |
|
671 * |
|
672 * @since 1.0 |
|
673 * @param aElement |
|
674 * @return |
|
675 */ |
|
676 TInt FindFontStyle(const TDesC& aElement); |
|
677 |
|
678 /** |
|
679 * Need method description - FindFontWeightEnum |
|
680 * |
|
681 * @since 1.0 |
|
682 * @param aElement |
|
683 * @return |
|
684 */ |
|
685 TInt FindFontWeightEnum(const TDesC& aElement); |
|
686 /** |
|
687 * Need method description - FindTextAnchorEnum |
|
688 * |
|
689 * @since 1.0 |
|
690 * @param aElement |
|
691 * @return |
|
692 */ |
|
693 TInt FindTextAnchorEnum(const TDesC& aElement); |
|
694 |
|
695 /** |
|
696 * Need method description - FindTextDecorationEnum |
|
697 * |
|
698 * @since 1.0 |
|
699 * @param aElement |
|
700 * @return |
|
701 */ |
|
702 TInt FindTextDecorationEnum(const TDesC& aElement); |
|
703 |
|
704 |
|
705 // Accessors |
|
706 |
|
707 /** |
|
708 * Need method description |
|
709 * |
|
710 * @since 1.0 |
|
711 * @param |
|
712 * @return |
|
713 */ |
|
714 static CSvgSchemaData* NewL(); |
|
715 |
|
716 /** |
|
717 * Need method description |
|
718 * |
|
719 * @since 1.0 |
|
720 * @param |
|
721 * @return |
|
722 */ |
|
723 static CSvgSchemaData* NewLC(); |
|
724 |
|
725 /** |
|
726 * Need method description |
|
727 * |
|
728 * @since 1.0 |
|
729 * @param |
|
730 * @return |
|
731 */ |
|
732 ~CSvgSchemaData(); |
|
733 |
|
734 void GetSVGElementName(const TUint8 aElement, TDes& aElemName); |
|
735 |
|
736 |
|
737 |
|
738 }; |
|
739 #endif |
|
740 |
|
741 |
|
742 |