|
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 source file |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SVGLINEARGRADIENTELEMENTIMPL_H |
|
20 #define SVGLINEARGRADIENTELEMENTIMPL_H |
|
21 |
|
22 #include "SVGGradientElementImpl.h" |
|
23 |
|
24 /** |
|
25 * Class description goes here. |
|
26 * |
|
27 * @lib SVGEngine.lib |
|
28 * @since 1.0 |
|
29 */ |
|
30 class CSvgLinearGradientElementImpl : public CSvgGradientElementImpl |
|
31 { |
|
32 public: |
|
33 |
|
34 // Constructor/deconstructor |
|
35 /** |
|
36 * Need method description |
|
37 * |
|
38 * @since 1.0 |
|
39 * @param |
|
40 * @return |
|
41 */ |
|
42 static CSvgLinearGradientElementImpl* NewL( const TUint8 aElemID, |
|
43 CSvgDocumentImpl* aDoc ); |
|
44 |
|
45 |
|
46 /** |
|
47 * Need method description |
|
48 * |
|
49 * @since 1.0 |
|
50 * @param |
|
51 * @return |
|
52 */ |
|
53 static CSvgLinearGradientElementImpl* NewLC( const TUint8 aElemID, |
|
54 CSvgDocumentImpl* aDoc ); |
|
55 |
|
56 /** |
|
57 * Need method description |
|
58 * |
|
59 * @since 1.0 |
|
60 * @param |
|
61 * @return |
|
62 */ |
|
63 MGfxPaint *PaintAttribute(); |
|
64 |
|
65 |
|
66 /** |
|
67 * Need method description |
|
68 * |
|
69 * @since 1.0 |
|
70 * @param |
|
71 * @return |
|
72 */ |
|
73 virtual ~CSvgLinearGradientElementImpl(); |
|
74 |
|
75 // From SVG DOM |
|
76 |
|
77 /** |
|
78 * Need method description |
|
79 * |
|
80 * @since 1.0 |
|
81 * @param |
|
82 * @return |
|
83 */ |
|
84 TInt GetAttributeFloat( const TInt aNameId, |
|
85 TFloatFixPt& aValue ); |
|
86 |
|
87 /** |
|
88 * Need method description |
|
89 * |
|
90 * @since 1.0 |
|
91 * @param |
|
92 * @return |
|
93 */ |
|
94 TInt SetAttributeFloatL( const TInt aNameId, |
|
95 const TFloatFixPt aValue ); |
|
96 TInt SetAttributeIntL( const TInt aNameId, |
|
97 const TInt32 aValue ); |
|
98 TInt GetAttributeIntL( const TInt aNameId, TInt32& aValue ); |
|
99 |
|
100 |
|
101 // From MXmlElement API |
|
102 /** |
|
103 * Need method description |
|
104 * |
|
105 * @since 1.0 |
|
106 * @param |
|
107 * @return |
|
108 */ |
|
109 TInt SetAttributeL( const TDesC& aName, |
|
110 const TDesC& aValue ); |
|
111 |
|
112 void Print( TBool aIsEncodeOn ); |
|
113 |
|
114 private: |
|
115 TGfxLinearGradientPaint iGfxLinearPaint; |
|
116 |
|
117 /** |
|
118 * Need method description |
|
119 * |
|
120 * @since 1.0 |
|
121 * @param |
|
122 * @return |
|
123 */ |
|
124 void ConstructL( const TUint8 aElemID ); |
|
125 |
|
126 |
|
127 /** |
|
128 * Need method description |
|
129 * |
|
130 * @since 1.0 |
|
131 * @param |
|
132 * @return |
|
133 */ |
|
134 CSvgLinearGradientElementImpl( CSvgDocumentImpl* aDoc ); |
|
135 /* |
|
136 * To add support for % values for x1,x2,y1,y2 |
|
137 */ |
|
138 TBool IsValidValue( const TDesC& aValue ); |
|
139 |
|
140 }; |
|
141 |
|
142 #endif /* SVGLINEARGRADIENTELEMENTIMPL_H */ |