|
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Client-side state information for OpenVG handle based objects |
|
15 |
|
16 #include "vgstate.h" |
|
17 #include "remotefunctioncall.h" |
|
18 #include "openvgrfc.h" |
|
19 |
|
20 |
|
21 ///////////////////////////////////////////////////////////////////////////////////////////// |
|
22 // CVgPathInfo |
|
23 ///////////////////////////////////////////////////////////////////////////////////////////// |
|
24 |
|
25 CVgPathInfo* CVgPathInfo::New(VGPathDatatype aDatatype, VGfloat aScale, VGfloat aBias, VGbitfield aCapabilities) |
|
26 { |
|
27 RHeap* clientHeap = CVghwUtils::SwitchToVghwHeap(); |
|
28 CVgPathInfo* self = new CVgPathInfo(aDatatype, aScale, aBias, aCapabilities); |
|
29 CVghwUtils::SwitchFromVghwHeap(clientHeap); |
|
30 return self; |
|
31 } |
|
32 |
|
33 |
|
34 void CVgPathInfo::ClearPath(MVgContext& aVgContext, VGbitfield aCapabilities) |
|
35 { |
|
36 iCapabilities = aCapabilities & VG_PATH_CAPABILITY_ALL; |
|
37 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
38 vgApiData.Init(OpenVgRFC::EvgClearPath, RemoteFunctionCallData::EOpRequest); |
|
39 vgApiData.AppendParam(HostHandle()); |
|
40 vgApiData.AppendParam(aCapabilities); |
|
41 aVgContext.ExecuteVgCommand(vgApiData); |
|
42 } |
|
43 |
|
44 |
|
45 void CVgPathInfo::RemovePathCapabilities(MVgContext& aVgContext, VGbitfield aCapabilities) |
|
46 { |
|
47 if (aCapabilities & VG_PATH_CAPABILITY_ALL) |
|
48 { |
|
49 iCapabilities = (iCapabilities & ~aCapabilities); |
|
50 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
51 vgApiData.Init(OpenVgRFC::EvgRemovePathCapabilities, RemoteFunctionCallData::EOpRequest); |
|
52 vgApiData.AppendParam(HostHandle()); |
|
53 vgApiData.AppendParam(aCapabilities & VG_PATH_CAPABILITY_ALL); |
|
54 aVgContext.ExecuteVgCommand(vgApiData); |
|
55 } |
|
56 } |
|
57 |
|
58 |
|
59 VGbitfield CVgPathInfo::GetPathCapabilities(MVgContext& aVgContext) |
|
60 { |
|
61 // value is tracked in Client side - but Debug builds verify state with the Host Open VG |
|
62 #ifdef _DEBUG |
|
63 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
64 vgApiData.Init(OpenVgRFC::EvgGetPathCapabilities); |
|
65 vgApiData.AppendParam(HostHandle()); |
|
66 VGPANIC_ASSERT_DEBUG(vgApiData.Data().Header().iOpType == RemoteFunctionCallData::EOpRequestWithReply, EVgPanicNotReplyOpcode); |
|
67 aVgContext.ExecuteVgCommand(vgApiData); |
|
68 VGbitfield hostCapabilities = static_cast<VGbitfield>(vgApiData.ReturnValue()); |
|
69 VGPANIC_ASSERT_DEBUG(hostCapabilities == iCapabilities, EVgPanicTemp); |
|
70 #endif |
|
71 return iCapabilities; |
|
72 } |
|
73 |
|
74 |
|
75 CVgPathInfo::~CVgPathInfo() |
|
76 {} |
|
77 |
|
78 CVgPathInfo::CVgPathInfo(VGPathDatatype aDatatype, VGfloat aScale, VGfloat aBias, VGbitfield aCapabilities) : |
|
79 CVgHandleBase(EVgHandleForPath), iDatatype(aDatatype), iScale(aScale), iBias(aBias), iCapabilities(aCapabilities) |
|
80 {} |
|
81 |
|
82 |
|
83 VGPathDatatype CVgPathInfo::PathDatatype() const |
|
84 { |
|
85 return iDatatype; |
|
86 } |
|
87 |
|
88 |
|
89 TBool CVgPathInfo::CheckHasPathCapabilities(MVgContext& aVgContext, VGbitfield aCapabilities) |
|
90 { |
|
91 if ( aCapabilities == (aCapabilities & iCapabilities) ) |
|
92 { |
|
93 return ETrue; |
|
94 } |
|
95 |
|
96 OPENVG_TRACE("CVgPathInfo::CheckHasPathCapabilities (iCapabilities=0x%x, aCapabilities=0x%x) setting VG_PATH_CAPABILITY_ERROR", |
|
97 iCapabilities, aCapabilities); |
|
98 aVgContext.SetVgError(VG_PATH_CAPABILITY_ERROR); |
|
99 return EFalse; |
|
100 } |
|
101 |
|
102 |
|
103 TBool CVgPathInfo::CheckPathDataAlignment(MVgContext& aVgContext, const void* aPathData) |
|
104 { |
|
105 TBool result = EFalse; |
|
106 if (aPathData != NULL) |
|
107 { |
|
108 switch (iDatatype) |
|
109 { |
|
110 case VG_PATH_DATATYPE_S_8: |
|
111 result = ETrue; |
|
112 break; |
|
113 case VG_PATH_DATATYPE_S_16: |
|
114 result = !( 1ul & (unsigned)aPathData ); |
|
115 break; |
|
116 case VG_PATH_DATATYPE_S_32: |
|
117 case VG_PATH_DATATYPE_F: |
|
118 result = !( 3ul & (unsigned)aPathData ); |
|
119 break; |
|
120 } |
|
121 } |
|
122 if (!result) |
|
123 { |
|
124 OPENVG_TRACE("CVgPathInfo::CheckPathDataAlignment (iDatatype=%d, aPathData=0x%x) setting VG_ILLEGAL_ARGUMENT_ERROR", |
|
125 iDatatype, aPathData); |
|
126 aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR); |
|
127 } |
|
128 return result; |
|
129 } |
|
130 |
|
131 |
|
132 // |
|
133 TBool CVgPathInfo::CheckPathDataSize(MVgContext& aVgContext, const VGubyte* aPathSegments, VGint aNumSegments, VGint* aPathDataSize) |
|
134 { |
|
135 TBool checkOkay = EFalse; |
|
136 VGint pathDataSize = 0; |
|
137 |
|
138 if ( (aNumSegments > 0) && (aPathSegments != NULL) ) |
|
139 { |
|
140 checkOkay = ETrue; |
|
141 |
|
142 #define SEGMENT_COMMAND(command) ((command) >> 1) |
|
143 // Number of coordinates for each command |
|
144 static const VGint KNumCoords[] = {0,2,2,1,1,4,6,2,4,5,5,5,5}; |
|
145 |
|
146 for (VGint segIdx = 0; segIdx < aNumSegments; ) |
|
147 { |
|
148 VGubyte segmentType = aPathSegments[segIdx++]; |
|
149 if (segmentType > 25) // VGPathSegment max value 12 << 1 or'd with 0|1 |
|
150 { |
|
151 OPENVG_TRACE(" CheckPathDataSize - unknown segmentType-0x%x", segmentType); |
|
152 checkOkay = EFalse; |
|
153 break; |
|
154 } |
|
155 VGint command = SEGMENT_COMMAND(segmentType); |
|
156 pathDataSize += KNumCoords[command]; |
|
157 OPENVG_TRACE(" CheckPathDataSize segmentType=0x%x: command=0x%x, Total Coord Count=%d", segmentType, command, pathDataSize); |
|
158 } |
|
159 } |
|
160 |
|
161 if ( !checkOkay ) |
|
162 { |
|
163 aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR); |
|
164 OPENVG_TRACE(" CheckPathDataSize - Illegal Argument Error, aPathSegments=0x%x, aNumSegments=%d", aPathSegments, aNumSegments); |
|
165 } |
|
166 else |
|
167 { |
|
168 // Number of bytes for each VGPathDatatype |
|
169 static const VGint KNumBytes[] = {1,2,4,4}; |
|
170 // convert coord count to bytes |
|
171 pathDataSize *= KNumBytes[iDatatype]; |
|
172 |
|
173 *aPathDataSize = pathDataSize; |
|
174 OPENVG_TRACE(" CheckPathDataSize - success, pathDataSize=%d bytes", pathDataSize); |
|
175 } |
|
176 return checkOkay; |
|
177 } |
|
178 |
|
179 |
|
180 // Check path parameters for vgAppendPathData |
|
181 TBool CVgPathInfo::CheckAppendPathData(MVgContext& aVgContext, VGint aNumSegments, const VGubyte* aPathSegments, const void* aPathData, |
|
182 VGint* aPathDataSize) |
|
183 { |
|
184 return CheckPathDataAlignment(aVgContext, aPathData) && CheckPathDataSize(aVgContext, aPathSegments, aNumSegments, aPathDataSize); |
|
185 } |
|
186 |
|
187 |
|
188 TBool CVgPathInfo::DestroyObject(MVgContext& aVgContext) |
|
189 { |
|
190 VGPANIC_ASSERT_DEBUG(iIsDestroyed, EVgPanicTemp); |
|
191 OPENVG_TRACE(" CVgPathInfo::DestroyObject HostHandle=0x%x", iHostHandle); |
|
192 |
|
193 if (iHostHandle) |
|
194 { |
|
195 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
196 vgApiData.Init(OpenVgRFC::EvgDestroyPath, RemoteFunctionCallData::EOpRequest); |
|
197 vgApiData.AppendParam(iHostHandle); |
|
198 aVgContext.ExecuteVgCommand(vgApiData); |
|
199 } |
|
200 |
|
201 return ETrue; |
|
202 } |
|
203 |
|
204 |
|
205 VGint CVgPathInfo::GetParameterVectorSize(MVgContext& aVgContext, VGint aParamType) |
|
206 { |
|
207 switch (aParamType) |
|
208 { |
|
209 case VG_PATH_FORMAT: |
|
210 case VG_PATH_DATATYPE: |
|
211 case VG_PATH_SCALE: |
|
212 case VG_PATH_BIAS: |
|
213 case VG_PATH_NUM_SEGMENTS: |
|
214 case VG_PATH_NUM_COORDS: |
|
215 return 1; |
|
216 } |
|
217 |
|
218 // invalid ParamType |
|
219 aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR); |
|
220 return 0; |
|
221 } |
|
222 |
|
223 |
|
224 VGfloat CVgPathInfo::GetParameterf(MVgContext& aVgContext, VGint aParamType) |
|
225 { |
|
226 switch (aParamType) |
|
227 { |
|
228 case VG_PATH_DATATYPE: |
|
229 return (VGfloat) iDatatype; |
|
230 |
|
231 case VG_PATH_SCALE: |
|
232 return iScale; |
|
233 |
|
234 case VG_PATH_BIAS: |
|
235 return iBias; |
|
236 |
|
237 case VG_PATH_FORMAT: |
|
238 case VG_PATH_NUM_SEGMENTS: |
|
239 case VG_PATH_NUM_COORDS: |
|
240 return HostVgGetParameterf(aVgContext, aParamType); |
|
241 } |
|
242 |
|
243 // invalid ParamType |
|
244 aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR); |
|
245 return 0; |
|
246 } |
|
247 |
|
248 |
|
249 VGint CVgPathInfo::GetParameteri(MVgContext& aVgContext, VGint aParamType) |
|
250 { |
|
251 switch (aParamType) |
|
252 { |
|
253 case VG_PATH_DATATYPE: |
|
254 return iDatatype; |
|
255 |
|
256 case VG_PATH_SCALE: |
|
257 return (VGint) iScale; |
|
258 |
|
259 case VG_PATH_BIAS: |
|
260 return (VGint) iBias; |
|
261 |
|
262 case VG_PATH_FORMAT: |
|
263 case VG_PATH_NUM_SEGMENTS: |
|
264 case VG_PATH_NUM_COORDS: |
|
265 return HostVgGetParameteri(aVgContext, aParamType); |
|
266 } |
|
267 |
|
268 // invalid ParamType |
|
269 aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR); |
|
270 return 0; |
|
271 } |
|
272 |
|
273 |
|
274 void CVgPathInfo::AppendPath(MVgContext& aVgContext, CVgPathInfo& aSrcPathInfo) |
|
275 { |
|
276 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
277 vgApiData.Init(OpenVgRFC::EvgAppendPath, RemoteFunctionCallData::EOpRequest); |
|
278 vgApiData.AppendParam(iHostHandle); |
|
279 vgApiData.AppendParam(aSrcPathInfo.HostHandle()); |
|
280 aVgContext.ExecuteVgCommand(vgApiData); |
|
281 } |
|
282 |
|
283 |
|
284 void CVgPathInfo::AppendPathData(MVgContext& aVgContext, VGint aNumSegments, const VGubyte * aPathSegments, const void* aPathData) |
|
285 { |
|
286 VGint pathDataSize = 0; |
|
287 if ( CheckAppendPathData(aVgContext, aNumSegments, aPathSegments, aPathData, &pathDataSize) ) |
|
288 { |
|
289 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
290 vgApiData.Init(OpenVgRFC::EvgAppendPathData, RemoteFunctionCallData::EOpRequest); |
|
291 vgApiData.AppendParam(iHostHandle); |
|
292 vgApiData.AppendParam(aNumSegments); |
|
293 vgApiData.AppendVector(aPathSegments, aNumSegments); |
|
294 vgApiData.AppendVector(aPathData, pathDataSize); |
|
295 aVgContext.ExecuteVgCommand(vgApiData); |
|
296 } |
|
297 } |
|
298 |
|
299 |
|
300 //Private extension to Open VG API to get the path length |
|
301 VGint CVgPathInfo::HostVgeGetPathCoordsSizeInBytes(MVgContext& aVgContext, VGint aStartIndex, VGint aNumSegments) |
|
302 { |
|
303 RemoteFunctionCallData rfcdata; OpenVgRFC vgApiData(rfcdata); |
|
304 vgApiData.Init(OpenVgRFC::EvgePathCoordsSizeInBytes); |
|
305 vgApiData.AppendParam(iHostHandle); |
|
306 vgApiData.AppendParam(aStartIndex); |
|
307 vgApiData.AppendParam(aNumSegments); |
|
308 VGPANIC_ASSERT_DEBUG(vgApiData.Data().Header().iOpType == RemoteFunctionCallData::EOpRequestWithReply, EVgPanicNotReplyOpcode); |
|
309 aVgContext.ExecuteVgCommand(vgApiData); |
|
310 return static_cast<VGint>(vgApiData.ReturnValue()); |
|
311 } |
|
312 |
|
313 |
|
314 void CVgPathInfo::ModifyPathCoords(MVgContext& aVgContext, VGint aStartIndex, VGint aNumSegments, const void* aPathData) |
|
315 { |
|
316 if (CheckPathDataAlignment(aVgContext, aPathData)) |
|
317 { |
|
318 // The host OpenVG implementation returns -1 if vgePathCoordsSizeInBytes is not supported |
|
319 // It does not seem simple to reliably implement vgePathCoordsSizeInBytes in the Symbian client |
|
320 VGint dataSize = HostVgeGetPathCoordsSizeInBytes(aVgContext, aStartIndex, aNumSegments); |
|
321 OPENVG_TRACE("TGuestOpenVg::vgModifyPathCoords - dataSize=%d", dataSize); |
|
322 if (dataSize <= 0) |
|
323 { |
|
324 aVgContext.SetVgError(VG_ILLEGAL_ARGUMENT_ERROR); |
|
325 } |
|
326 else |
|
327 { |
|
328 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
329 vgApiData.Init(OpenVgRFC::EvgModifyPathCoords, RemoteFunctionCallData::EOpRequest); |
|
330 vgApiData.AppendParam(iHostHandle); |
|
331 vgApiData.AppendParam(aStartIndex); |
|
332 vgApiData.AppendParam(aNumSegments); |
|
333 vgApiData.AppendVector(aPathData, dataSize); |
|
334 aVgContext.ExecuteVgCommand(vgApiData); |
|
335 } |
|
336 } |
|
337 } |
|
338 |
|
339 |
|
340 void CVgPathInfo::TransformPath(MVgContext& aVgContext, CVgPathInfo& aSrcPathInfo) |
|
341 { |
|
342 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
343 vgApiData.Init(OpenVgRFC::EvgTransformPath, RemoteFunctionCallData::EOpRequest); |
|
344 vgApiData.AppendParam(iHostHandle); |
|
345 vgApiData.AppendParam(aSrcPathInfo.HostHandle()); |
|
346 aVgContext.ExecuteVgCommand(vgApiData); |
|
347 } |
|
348 |
|
349 |
|
350 VGboolean CVgPathInfo::InterpolatePath(MVgContext& aVgContext, CVgPathInfo& aStartPathInfo, CVgPathInfo& aEndPathInfo, VGfloat aAmount) |
|
351 { |
|
352 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
353 vgApiData.Init(OpenVgRFC::EvgInterpolatePath); |
|
354 vgApiData.AppendParam(iHostHandle); |
|
355 vgApiData.AppendParam(aStartPathInfo.HostHandle()); |
|
356 vgApiData.AppendParam(aEndPathInfo.HostHandle()); |
|
357 vgApiData.AppendParam(aAmount); |
|
358 VGPANIC_ASSERT_DEBUG(vgApiData.Data().Header().iOpType == RemoteFunctionCallData::EOpRequestWithReply, EVgPanicNotReplyOpcode); |
|
359 aVgContext.ExecuteVgCommand(vgApiData); |
|
360 return static_cast<VGboolean>(vgApiData.ReturnValue()); |
|
361 } |
|
362 |
|
363 |
|
364 VGfloat CVgPathInfo::PathLength(MVgContext& aVgContext, VGint aStartSegment, VGint aNumSegments) |
|
365 { |
|
366 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
367 vgApiData.Init(OpenVgRFC::EvgPathLength); |
|
368 vgApiData.AppendParam(iHostHandle); |
|
369 vgApiData.AppendParam(aStartSegment); |
|
370 vgApiData.AppendParam(aNumSegments); |
|
371 VGPANIC_ASSERT_DEBUG(vgApiData.Data().Header().iOpType == RemoteFunctionCallData::EOpRequestWithReply, EVgPanicNotReplyOpcode); |
|
372 aVgContext.ExecuteVgCommand(vgApiData); |
|
373 return static_cast<VGfloat>(vgApiData.ReturnValue()); |
|
374 } |
|
375 |
|
376 |
|
377 void CVgPathInfo::PointAlongPath(MVgContext& aVgContext, VGint aStartSegment, VGint aNumSegments, VGfloat aDistance, |
|
378 VGfloat* aX, VGfloat* aY, VGfloat* aTangentX, VGfloat* aTangentY) |
|
379 { |
|
380 TBool getPoint = (aX && aY); |
|
381 TBool getTangent = (aTangentX && aTangentY); |
|
382 |
|
383 if ( getPoint && !TCheck::Chk2x32bitPtr(aVgContext, aX, aY) ) |
|
384 { |
|
385 return; |
|
386 } |
|
387 if ( getTangent && !TCheck::Chk2x32bitPtr(aVgContext, aTangentX, aTangentY) ) |
|
388 { |
|
389 return; |
|
390 } |
|
391 if (getPoint || getTangent) |
|
392 { |
|
393 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
394 vgApiData.Init(OpenVgRFC::EvgPointAlongPath); |
|
395 vgApiData.AppendParam(iHostHandle); |
|
396 vgApiData.AppendParam(aStartSegment); |
|
397 vgApiData.AppendParam(aNumSegments); |
|
398 vgApiData.AppendParam(aDistance); |
|
399 vgApiData.AppendVector(aX, getPoint ? 1 : 0, RemoteFunctionCallData::EOut); |
|
400 vgApiData.AppendVector(aY, getPoint ? 1 : 0, RemoteFunctionCallData::EOut); |
|
401 vgApiData.AppendVector(aTangentX, getTangent ? 1 : 0, RemoteFunctionCallData::EOut); |
|
402 vgApiData.AppendVector(aTangentY, getTangent ? 1 : 0, RemoteFunctionCallData::EOut); |
|
403 aVgContext.ExecuteVgCommand(vgApiData); |
|
404 } |
|
405 } |
|
406 |
|
407 |
|
408 void CVgPathInfo::PathBounds(MVgContext& aVgContext, VGfloat* aMinX, VGfloat* aMinY, VGfloat* aWidth, VGfloat* aHeight) |
|
409 { |
|
410 if (TCheck::Chk4x32bitPtr(aVgContext, aMinX, aMinY, aWidth, aHeight) ) |
|
411 { |
|
412 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
413 vgApiData.Init(OpenVgRFC::EvgPathBounds); |
|
414 vgApiData.AppendParam(iHostHandle); |
|
415 vgApiData.AppendVector(aMinX, 1, RemoteFunctionCallData::EOut); |
|
416 vgApiData.AppendVector(aMinY, 1, RemoteFunctionCallData::EOut); |
|
417 vgApiData.AppendVector(aWidth, 1, RemoteFunctionCallData::EOut); |
|
418 vgApiData.AppendVector(aHeight, 1, RemoteFunctionCallData::EOut); |
|
419 aVgContext.ExecuteVgCommand(vgApiData); |
|
420 } |
|
421 } |
|
422 |
|
423 |
|
424 void CVgPathInfo::PathTransformedBounds(MVgContext& aVgContext, VGfloat* aMinX, VGfloat* aMinY, VGfloat* aWidth, VGfloat* aHeight) |
|
425 { |
|
426 if (TCheck::Chk4x32bitPtr(aVgContext, aMinX, aMinY, aWidth, aHeight) ) |
|
427 { |
|
428 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
429 vgApiData.Init(OpenVgRFC::EvgPathTransformedBounds); |
|
430 vgApiData.AppendParam(iHostHandle); |
|
431 vgApiData.AppendVector(aMinX, 1, RemoteFunctionCallData::EOut); |
|
432 vgApiData.AppendVector(aMinY, 1, RemoteFunctionCallData::EOut); |
|
433 vgApiData.AppendVector(aWidth, 1, RemoteFunctionCallData::EOut); |
|
434 vgApiData.AppendVector(aHeight, 1, RemoteFunctionCallData::EOut); |
|
435 aVgContext.ExecuteVgCommand(vgApiData); |
|
436 } |
|
437 } |
|
438 |
|
439 |
|
440 void CVgPathInfo::DrawPath(MVgContext& aVgContext, VGbitfield aPaintModes) |
|
441 { |
|
442 if ( TCheck::ChkVGPaintModesCombination(aVgContext, aPaintModes) ) |
|
443 { |
|
444 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
445 vgApiData.Init(OpenVgRFC::EvgDrawPath, RemoteFunctionCallData::EOpRequest); |
|
446 vgApiData.AppendParam(iHostHandle); |
|
447 vgApiData.AppendParam(aPaintModes); |
|
448 aVgContext.ExecuteVgCommand(vgApiData); |
|
449 } |
|
450 } |
|
451 |
|
452 |
|
453 void CVgPathInfo::RenderToMask(MVgContext& aVgContext, VGbitfield aPaintModes, VGMaskOperation aOperation) |
|
454 { |
|
455 if ( TCheck::ChkVGPaintModesCombination(aVgContext, aPaintModes) && TCheck::ChkVGMaskOperation(aVgContext, aOperation) ) |
|
456 { |
|
457 RemoteFunctionCallData data; OpenVgRFC vgApiData(data); |
|
458 vgApiData.Init(OpenVgRFC::EvgRenderToMask, RemoteFunctionCallData::EOpRequest); |
|
459 vgApiData.AppendParam(iHostHandle); |
|
460 vgApiData.AppendParam(aPaintModes); |
|
461 vgApiData.AppendParam(aOperation); |
|
462 aVgContext.ExecuteVgCommand(vgApiData); |
|
463 } |
|
464 } |
|
465 |
|
466 |
|
467 // end of file vgpath.cpp |