|
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 SVGGRADIENTELEMENTIMPL_H |
|
20 #define SVGGRADIENTELEMENTIMPL_H |
|
21 |
|
22 #include "SVGElementImpl.h" |
|
23 #include "SvgStopElementImpl.h" |
|
24 #include "GfxGradientPaint.h" |
|
25 |
|
26 // |
|
27 class CSvgDocumentImpl; |
|
28 |
|
29 /** |
|
30 * Class description goes here. |
|
31 * |
|
32 * @lib SVGEngine.lib |
|
33 * @since 1.0 |
|
34 */ |
|
35 class CSvgGradientElementImpl : public CSvgElementImpl |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Need method description |
|
40 * |
|
41 * @since 1.0 |
|
42 * @param |
|
43 * @return |
|
44 */ |
|
45 CSvgGradientElementImpl( CSvgDocumentImpl* aDoc ); |
|
46 |
|
47 /** |
|
48 * The function not only adds the element in Stop element array but also |
|
49 * adjusts the offset values of all the previously added elements such that |
|
50 * offset value. |
|
51 * |
|
52 * @param : aStopEl -- Pointer to stop element. |
|
53 * @return: none |
|
54 */ |
|
55 void AddStopElementInArray(CSvgStopElementImpl *aStopEl); |
|
56 |
|
57 /** |
|
58 * Adjusts the offset values of all the previously added elements such that |
|
59 * each gradient offset value is greater than the previous gradient stop's |
|
60 * each gradient offset value is greater than the previous gradient stop's |
|
61 * offset value. |
|
62 * |
|
63 * @param : aStopEl -- Pointer to stop element. |
|
64 * @return: none |
|
65 */ |
|
66 void UpdateOffsetValues(CSvgStopElementImpl *aStopEl); |
|
67 |
|
68 /** |
|
69 * Need method description |
|
70 * |
|
71 * @since 1.0 |
|
72 * @param |
|
73 * @return |
|
74 */ |
|
75 TInt SetAttributeL( const TDesC& aName,const TDesC& aValue ); |
|
76 TInt SetAttributeIntL( const TInt aNameId, |
|
77 const TInt32 aValue ); |
|
78 TInt GetAttributeIntL(const TInt aNameId, TInt32& aValue ); |
|
79 |
|
80 void SetGradientTransMatrix(SVGReal aMatrix[2][3]); |
|
81 |
|
82 /** |
|
83 * Need method description |
|
84 * |
|
85 * @since 1.0 |
|
86 * @param |
|
87 * @return |
|
88 */ |
|
89 virtual MGfxPaint *PaintAttribute() = 0; |
|
90 |
|
91 /** |
|
92 * Need method description |
|
93 * |
|
94 * @since 1.0 |
|
95 * @param |
|
96 * @return |
|
97 */ |
|
98 ~CSvgGradientElementImpl(); |
|
99 |
|
100 RPointerArray<CSvgStopElementImpl> *iSvgStopElementArray; |
|
101 |
|
102 protected: |
|
103 /** |
|
104 * Need method description |
|
105 * |
|
106 * @since 1.0 |
|
107 * @param |
|
108 * @return |
|
109 */ |
|
110 void ConstructL(const TUint8 aElemID); |
|
111 |
|
112 protected: |
|
113 |
|
114 TGfxGradientPaint* iGradientPaint; |
|
115 |
|
116 RArray<TSvgStopData> *iStopElementData; |
|
117 }; |
|
118 |
|
119 #endif /* SVGGRADIENTELEMENTIMPL_H */ |