|
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 header file |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __OPENVGRENDERER_H__ |
|
19 #define __OPENVGRENDERER_H__ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32std.h> |
|
23 |
|
24 #include "MVGRendererImpl.h" |
|
25 |
|
26 |
|
27 class COpenVGRenderer : public CBase, public MVGRendererImpl |
|
28 { |
|
29 public: |
|
30 ~COpenVGRenderer(){} |
|
31 COpenVGRenderer() {} |
|
32 |
|
33 public: |
|
34 virtual void vgClear(TInt x, TInt y, TInt width, TInt height); |
|
35 virtual void vgSeti(TInt type, TInt value); |
|
36 virtual void vgSetf (TInt type, TReal32 value); |
|
37 virtual void vgSetfv(TInt type, TInt count, const TReal32 * values); |
|
38 virtual void vgSetiv(TInt type, TInt count, const TInt * values); |
|
39 virtual void vgSetParameteri(TUint handle, TInt paramType, TInt value); |
|
40 virtual void vgSetParameterf(TUint handle,TInt paramType,TReal32 value); |
|
41 virtual void vgSetParameterfv(TUint object,TInt paramType,TInt count, const TReal32 * values); |
|
42 virtual TInt vgGeti(TInt type); |
|
43 |
|
44 |
|
45 virtual void vgSetColor(TUint paint, TUint rgba); |
|
46 virtual void vgSetPaint(TUint paint, TUint paintModes); |
|
47 virtual TUint vgCreatePaint(); |
|
48 virtual TUint vgCreatePath(TInt pathFormat, TInt datatype, TReal32 scale, TReal32 bias, |
|
49 TInt segmentCapacityHint, TInt coordCapacityHint, TInt capabilities); |
|
50 |
|
51 virtual void vgLoadMatrix(const TReal32 * m); |
|
52 virtual void vgMultMatrix(const TReal32 * m); |
|
53 virtual void vgLoadIdentity(); |
|
54 virtual void vgScale(TReal32 sx, TReal32 sy); |
|
55 virtual void vgRotate(TReal32 angle); |
|
56 virtual void vgTranslate(TReal32 tx, TReal32 ty); |
|
57 virtual void vgReadPixels(void * data, TInt dataStride,TInt dataFormat,TInt sx, TInt sy,TInt width, TInt height); |
|
58 void vgWritePixels(const void * data, TInt dataStride, TInt dataFormat, |
|
59 TInt dx, TInt dy, TInt width, TInt height); |
|
60 |
|
61 virtual void vgAppendPathData(TUint path,TInt numSegments, |
|
62 const TUint8 * pathSegments, |
|
63 const void * pathData); |
|
64 |
|
65 virtual void vgDrawPath(TUint path, TUint paintModes); |
|
66 virtual void vgClearPath(TUint path, TUint capabilities); |
|
67 |
|
68 virtual TInt vguRect(TUint path, TReal32 x, TReal32 y, |
|
69 TReal32 width, TReal32 height); |
|
70 |
|
71 virtual TInt vguEllipse(TUint path, TReal32 cx, TReal32 cy, |
|
72 TReal32 width, TReal32 height); |
|
73 |
|
74 virtual TInt vguRoundRect(TUint path, TReal32 x, TReal32 y, |
|
75 TReal32 width, TReal32 height, TReal32 arcWidth, TReal32 arcHeight); |
|
76 virtual TInt vguLine(TUint path,TReal32 x0, TReal32 y0,TReal32 x1, TReal32 y1); |
|
77 virtual void DumpToLogFile(); |
|
78 virtual void CloseLogFile(); |
|
79 virtual TUint vgCreateImage(TInt format, TInt width, TInt height, TInt allowedQuality); |
|
80 virtual void vgGetPixels(TUint dst, TInt dx, TInt dy, TInt sx, TInt sy, TInt width, TInt height); |
|
81 virtual void vgDrawImage(TUint image); |
|
82 |
|
83 |
|
84 virtual void vgClearImage(TUint image, TInt x, TInt y, TInt width, TInt height); |
|
85 |
|
86 virtual void vgImageSubData(TUint image, const void * data, TInt dataStride, |
|
87 TInt dataFormat, TInt x, TInt y, TInt width, TInt height); |
|
88 |
|
89 |
|
90 virtual void vgMask(TUint mask, TInt operation, TInt x, TInt y, TInt width, TInt height); |
|
91 |
|
92 virtual void vgDestroyImage(TUint aHandle); |
|
93 virtual void vgDestroyPaint(TUint aHandle); |
|
94 virtual void vgDestroyPath(TUint aHandle); |
|
95 |
|
96 virtual void vgFlush(); |
|
97 virtual TInt vgGetError(); |
|
98 //Dummy added for getting TLV data from pseudorenderer. |
|
99 virtual const TPtrC8 TLVEncodedData() const; |
|
100 |
|
101 }; |
|
102 |
|
103 #endif |
|
104 |