|
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: COpenVGRenderer source file |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "OpenVGRenderer.h" |
|
19 |
|
20 #include <VG/vgu.h> |
|
21 |
|
22 #include <e32debug.h> |
|
23 void COpenVGRenderer::vgClear(TInt x, TInt y, TInt width, TInt height) |
|
24 { |
|
25 ::vgClear(x, y, width, height); |
|
26 } |
|
27 |
|
28 void COpenVGRenderer::vgSeti(TInt type, TInt value) |
|
29 { |
|
30 ::vgSeti((VGParamType)type, value); |
|
31 } |
|
32 TInt COpenVGRenderer::vgGeti(TInt type) |
|
33 { |
|
34 return ::vgGeti((VGParamType)type); |
|
35 } |
|
36 |
|
37 void COpenVGRenderer::vgSetf (TInt type, TReal32 value) |
|
38 { |
|
39 ::vgSetf((VGParamType)type, value); |
|
40 } |
|
41 void COpenVGRenderer::vgSetiv(TInt type, TInt count, const TInt * values) |
|
42 { |
|
43 ::vgSetiv((VGParamType)type, count, (const VGint*)values); |
|
44 } |
|
45 |
|
46 void COpenVGRenderer::vgSetfv(TInt type, TInt count, const TReal32 * values) |
|
47 { |
|
48 ::vgSetfv((VGParamType)type, count, values); |
|
49 } |
|
50 |
|
51 void COpenVGRenderer::vgSetParameteri(TUint handle, TInt paramType, TInt value) |
|
52 { |
|
53 ::vgSetParameteri(handle, paramType, value); |
|
54 } |
|
55 |
|
56 void COpenVGRenderer::vgSetParameterf(TUint handle, TInt paramType, TReal32 value) |
|
57 { |
|
58 ::vgSetParameterf(handle, paramType, value); |
|
59 } |
|
60 |
|
61 void COpenVGRenderer::vgSetParameterfv(TUint object, TInt paramType, TInt count, const TReal32 * values) |
|
62 { |
|
63 ::vgSetParameterfv(object, paramType, count, values); |
|
64 } |
|
65 |
|
66 void COpenVGRenderer::vgSetColor(TUint paint, TUint rgba) |
|
67 { |
|
68 ::vgSetColor(paint, rgba); |
|
69 } |
|
70 |
|
71 void COpenVGRenderer::vgSetPaint(TUint paint, TUint paintModes) |
|
72 { |
|
73 ::vgSetPaint(paint, paintModes); |
|
74 } |
|
75 |
|
76 TUint COpenVGRenderer::vgCreatePaint() |
|
77 { |
|
78 return ::vgCreatePaint(); |
|
79 } |
|
80 |
|
81 TUint COpenVGRenderer::vgCreatePath(TInt pathFormat, TInt datatype, TReal32 scale, TReal32 bias, |
|
82 TInt segmentCapacityHint, TInt coordCapacityHint, TInt capabilities) |
|
83 { |
|
84 return ::vgCreatePath(pathFormat, (VGPathDatatype)datatype, scale, bias, segmentCapacityHint, coordCapacityHint, capabilities); |
|
85 } |
|
86 |
|
87 void COpenVGRenderer::vgLoadMatrix(const TReal32 * m) |
|
88 { |
|
89 ::vgLoadMatrix(m); |
|
90 } |
|
91 |
|
92 void COpenVGRenderer::vgMultMatrix(const TReal32 * m) |
|
93 { |
|
94 ::vgMultMatrix(m); |
|
95 } |
|
96 |
|
97 void COpenVGRenderer::vgLoadIdentity() |
|
98 { |
|
99 ::vgLoadIdentity(); |
|
100 } |
|
101 |
|
102 void COpenVGRenderer::vgScale(TReal32 sx, TReal32 sy) |
|
103 { |
|
104 ::vgScale(sx, sy); |
|
105 } |
|
106 |
|
107 void COpenVGRenderer::vgRotate(TReal32 angle) |
|
108 { |
|
109 ::vgRotate(angle); |
|
110 } |
|
111 void COpenVGRenderer::vgReadPixels(void * data, TInt dataStride,TInt dataFormat,TInt sx, TInt sy,TInt width, TInt height) |
|
112 { |
|
113 ::vgReadPixels(data,dataStride,(VGImageFormat)dataFormat,sx,sy,width,height); |
|
114 } |
|
115 |
|
116 void COpenVGRenderer::vgWritePixels(const void * data, TInt dataStride, TInt dataFormat, |
|
117 TInt dx, TInt dy, TInt width, TInt height) |
|
118 { |
|
119 ::vgWritePixels(data, dataStride, (VGImageFormat)dataFormat, dx, dy, width, height); |
|
120 } |
|
121 |
|
122 void COpenVGRenderer::vgTranslate(TReal32 tx, TReal32 ty) |
|
123 { |
|
124 ::vgTranslate(tx, ty); |
|
125 } |
|
126 |
|
127 void COpenVGRenderer::vgAppendPathData(TUint path, TInt numSegments, |
|
128 const TUint8 * pathSegments, |
|
129 const void * pathData) |
|
130 { |
|
131 ::vgAppendPathData(path, numSegments, pathSegments, pathData); |
|
132 } |
|
133 |
|
134 void COpenVGRenderer::vgDrawPath(TUint path, TUint paintModes) |
|
135 { |
|
136 ::vgDrawPath(path, paintModes); |
|
137 } |
|
138 |
|
139 void COpenVGRenderer::vgClearPath(TUint path, TUint capabilities) |
|
140 { |
|
141 ::vgClearPath(path, capabilities); |
|
142 } |
|
143 |
|
144 TInt COpenVGRenderer::vguRect(TUint path, TReal32 x, TReal32 y, |
|
145 TReal32 width, TReal32 height) |
|
146 { |
|
147 return ::vguRect(path, x, y, width, height); |
|
148 } |
|
149 |
|
150 TInt COpenVGRenderer::vguEllipse(TUint path, |
|
151 TReal32 cx, TReal32 cy, |
|
152 TReal32 width, TReal32 height) |
|
153 { |
|
154 return ::vguEllipse(path, cx, cy, width, height); |
|
155 } |
|
156 |
|
157 TInt COpenVGRenderer::vguRoundRect(TUint path, TReal32 x, TReal32 y, |
|
158 TReal32 width, TReal32 height, TReal32 arcWidth, TReal32 arcHeight) |
|
159 { |
|
160 return ::vguRoundRect(path, x, y, width, height, arcWidth, arcHeight); |
|
161 } |
|
162 |
|
163 TInt COpenVGRenderer::vguLine(TUint path, TReal32 x0, TReal32 y0, TReal32 x1, TReal32 y1) |
|
164 { |
|
165 return ::vguLine(path, x0, y0, x1, y1); |
|
166 } |
|
167 |
|
168 void COpenVGRenderer::DumpToLogFile() |
|
169 { |
|
170 // Nothing TO DO here |
|
171 } |
|
172 void COpenVGRenderer::CloseLogFile() |
|
173 { |
|
174 // Nothing TO DO here |
|
175 } |
|
176 |
|
177 TUint COpenVGRenderer::vgCreateImage(TInt format, TInt width, TInt height, TInt allowedQuality) |
|
178 { |
|
179 return ::vgCreateImage((VGImageFormat)format, width, height, allowedQuality); |
|
180 } |
|
181 |
|
182 void COpenVGRenderer::vgGetPixels(TUint dst, TInt dx, TInt dy, TInt sx, TInt sy, TInt width, TInt height) |
|
183 { |
|
184 ::vgGetPixels(dst, dx, dy, sx, sy, width, height); |
|
185 } |
|
186 |
|
187 void COpenVGRenderer::vgDrawImage(TUint image) |
|
188 { |
|
189 ::vgDrawImage(image); |
|
190 } |
|
191 |
|
192 void COpenVGRenderer::vgClearImage(TUint image, TInt x, TInt y, TInt width, TInt height) |
|
193 { |
|
194 return ::vgClearImage(image, x, y, width, height); |
|
195 } |
|
196 |
|
197 void COpenVGRenderer::vgImageSubData(TUint image, const void * data, TInt dataStride, |
|
198 TInt dataFormat, TInt x, TInt y, TInt width, TInt height) |
|
199 { |
|
200 return ::vgImageSubData(image, data, dataStride, (VGImageFormat)dataFormat, x, y, width, height); |
|
201 } |
|
202 |
|
203 void COpenVGRenderer::vgMask(TUint mask, TInt operation, TInt x, TInt y, TInt width, TInt height) |
|
204 { |
|
205 return ::vgMask(mask, (VGMaskOperation)operation, x, y, width, height); |
|
206 } |
|
207 |
|
208 void COpenVGRenderer::vgDestroyImage(TUint aHandle) |
|
209 { |
|
210 ::vgDestroyImage(aHandle); |
|
211 } |
|
212 |
|
213 void COpenVGRenderer::vgDestroyPaint(TUint aHandle) |
|
214 { |
|
215 ::vgDestroyPaint(aHandle); |
|
216 } |
|
217 |
|
218 void COpenVGRenderer::vgDestroyPath(TUint aHandle) |
|
219 { |
|
220 ::vgDestroyPath(aHandle); |
|
221 } |
|
222 |
|
223 void COpenVGRenderer::vgFlush() |
|
224 { |
|
225 ::vgFlush(); |
|
226 } |
|
227 |
|
228 TInt COpenVGRenderer::vgGetError() |
|
229 { |
|
230 return ::vgGetError(); |
|
231 } |
|
232 const TPtrC8 COpenVGRenderer::TLVEncodedData() const |
|
233 { |
|
234 return TPtrC8(); |
|
235 } |