|
1 /* |
|
2 * Copyright (c) 2009 Symbian Foundation Ltd |
|
3 * This component and the accompanying materials are made available |
|
4 * under the terms of the License "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 * Symbian Foundation Ltd - initial contribution. |
|
10 * |
|
11 * Contributors: |
|
12 * |
|
13 * Description: |
|
14 * Implementation of a OpenVG like interface. Basically every OpenVG API names but prefixed with do_ e.g. do_vgSetf |
|
15 */ |
|
16 |
|
17 #ifndef OPENVGINTERNAL_H |
|
18 #define OPENVGINTERNAL_H |
|
19 |
|
20 #include <openvg.h> |
|
21 |
|
22 /* |
|
23 * defines set of internal vgu functions that are 1:1 with the published openvg functions. |
|
24 * E.g. vgSetf -> do_vgSetf |
|
25 * |
|
26 * These do_XXX fucntions are called from the libopenvg.dll (which is a shim) to be processed here |
|
27 */ |
|
28 |
|
29 IMPORT_C VGErrorCode do_vgGetError(void); |
|
30 IMPORT_C void do_vgFlush(void); |
|
31 IMPORT_C void do_vgFinish(void); |
|
32 IMPORT_C void do_vgSetf(VGParamType type, VGfloat value); |
|
33 IMPORT_C void do_vgSeti(VGParamType type, VGint value); |
|
34 IMPORT_C void do_vgSetfv(VGParamType type, VGint count ,const VGfloat* values); |
|
35 IMPORT_C void do_vgSetiv(VGParamType type, VGint count ,const VGint* values); |
|
36 IMPORT_C VGfloat do_vgGetf(VGParamType type); |
|
37 IMPORT_C VGint do_vgGeti(VGParamType type); |
|
38 IMPORT_C VGint do_vgGetVectorSize(VGParamType type); |
|
39 IMPORT_C void do_vgGetfv(VGParamType type, VGint count ,VGfloat* values); |
|
40 IMPORT_C void do_vgGetiv(VGParamType type, VGint count ,VGint* values); |
|
41 IMPORT_C void do_vgSetParameterf(VGHandle object ,VGint paramType ,VGfloat value); |
|
42 IMPORT_C void do_vgSetParameteri(VGHandle object ,VGint paramType ,VGint value); |
|
43 IMPORT_C void do_vgSetParameterfv(VGHandle object ,VGint paramType ,VGint count ,const VGfloat* values); |
|
44 IMPORT_C void do_vgSetParameteriv(VGHandle object ,VGint paramType ,VGint count ,const VGint* values); |
|
45 IMPORT_C VGfloat do_vgGetParameterf(VGHandle object ,VGint paramType); |
|
46 IMPORT_C VGint do_vgGetParameteri(VGHandle object ,VGint paramType); |
|
47 IMPORT_C VGint do_vgGetParameterVectorSize(VGHandle object ,VGint paramType); |
|
48 IMPORT_C void do_vgGetParameterfv(VGHandle object ,VGint paramType ,VGint count ,VGfloat* values); |
|
49 IMPORT_C void do_vgGetParameteriv(VGHandle object ,VGint paramType ,VGint count ,VGint* values); |
|
50 IMPORT_C void do_vgLoadIdentity(void); |
|
51 IMPORT_C void do_vgLoadMatrix(const VGfloat* m); |
|
52 IMPORT_C void do_vgGetMatrix(VGfloat* m); |
|
53 IMPORT_C void do_vgMultMatrix(const VGfloat* m); |
|
54 IMPORT_C void do_vgTranslate(VGfloat tx, VGfloat ty); |
|
55 IMPORT_C void do_vgScale(VGfloat sx, VGfloat sy); |
|
56 IMPORT_C void do_vgShear(VGfloat shx, VGfloat shy); |
|
57 IMPORT_C void do_vgRotate(VGfloat angle); |
|
58 IMPORT_C void do_vgMask(VGHandle mask, VGMaskOperation operation ,VGint x, VGint y ,VGint width, VGint height); |
|
59 IMPORT_C void do_vgRenderToMask(VGPath path ,VGbitfield paintModes ,VGMaskOperation operation); |
|
60 IMPORT_C VGMaskLayer do_vgCreateMaskLayer(VGint width, VGint height); |
|
61 IMPORT_C void do_vgDestroyMaskLayer(VGMaskLayer maskLayer); |
|
62 IMPORT_C void do_vgFillMaskLayer(VGMaskLayer maskLayer ,VGint x, VGint y ,VGint width, VGint height ,VGfloat value); |
|
63 IMPORT_C void do_vgCopyMask(VGMaskLayer maskLayer ,VGint sx, VGint sy ,VGint dx, VGint dy ,VGint width, VGint height); |
|
64 IMPORT_C void do_vgClear(VGint x, VGint y ,VGint width, VGint height); |
|
65 IMPORT_C VGPath do_vgCreatePath(VGint pathFormat ,VGPathDatatype datatype ,VGfloat scale, VGfloat bias ,VGint segmentCapacityHint ,VGint coordCapacityHint ,VGbitfield capabilities); |
|
66 IMPORT_C void do_vgClearPath(VGPath path, VGbitfield capabilities); |
|
67 IMPORT_C void do_vgDestroyPath(VGPath path); |
|
68 IMPORT_C void do_vgRemovePathCapabilities(VGPath path ,VGbitfield capabilities); |
|
69 IMPORT_C VGbitfield do_vgGetPathCapabilities(VGPath path); |
|
70 IMPORT_C void do_vgAppendPath(VGPath dstPath, VGPath srcPath); |
|
71 IMPORT_C void do_vgAppendPathData(VGPath dstPath ,VGint numSegments ,const VGubyte* pathSegments ,const void* pathData); |
|
72 IMPORT_C void do_vgModifyPathCoords(VGPath dstPath ,VGint startIndex ,VGint numSegments ,const void* pathData); |
|
73 IMPORT_C void do_vgTransformPath(VGPath dstPath, VGPath srcPath); |
|
74 IMPORT_C VGboolean do_vgInterpolatePath(VGPath dstPath ,VGPath startPath ,VGPath endPath ,VGfloat amount); |
|
75 IMPORT_C VGfloat do_vgPathLength(VGPath path ,VGint startSegment ,VGint numSegments); |
|
76 IMPORT_C void do_vgPointAlongPath(VGPath path ,VGint startSegment ,VGint numSegments ,VGfloat distance ,VGfloat* x, VGfloat* y ,VGfloat* tangentX ,VGfloat* tangentY); |
|
77 IMPORT_C void do_vgPathBounds(VGPath path ,VGfloat* minX ,VGfloat* minY ,VGfloat* width ,VGfloat* height); |
|
78 IMPORT_C void do_vgPathTransformedBounds(VGPath path ,VGfloat* minX ,VGfloat* minY ,VGfloat* width ,VGfloat* height); |
|
79 IMPORT_C void do_vgDrawPath(VGPath path, VGbitfield paintModes); |
|
80 IMPORT_C VGPaint do_vgCreatePaint(void); |
|
81 IMPORT_C void do_vgDestroyPaint(VGPaint paint); |
|
82 IMPORT_C void do_vgSetPaint(VGPaint paint, VGbitfield paintModes); |
|
83 IMPORT_C VGPaint do_vgGetPaint(VGPaintMode paintMode); |
|
84 IMPORT_C void do_vgSetColor(VGPaint paint, VGuint rgba); |
|
85 IMPORT_C VGuint do_vgGetColor(VGPaint paint); |
|
86 IMPORT_C void do_vgPaintPattern(VGPaint paint, VGImage pattern); |
|
87 IMPORT_C VGImage do_vgCreateImage(VGImageFormat format ,VGint width, VGint height ,VGbitfield allowedQuality); |
|
88 IMPORT_C void do_vgDestroyImage(VGImage image); |
|
89 IMPORT_C void do_vgClearImage(VGImage image ,VGint x, VGint y ,VGint width, VGint height); |
|
90 IMPORT_C void do_vgImageSubData(VGImage image ,const void* data ,VGint dataStride ,VGImageFormat dataFormat ,VGint x, VGint y ,VGint width, VGint height); |
|
91 IMPORT_C void do_vgGetImageSubData(VGImage image ,void* data ,VGint dataStride ,VGImageFormat dataFormat ,VGint x, VGint y ,VGint width, VGint height); |
|
92 IMPORT_C VGImage do_vgChildImage(VGImage parent ,VGint x, VGint y ,VGint width, VGint height); |
|
93 IMPORT_C VGImage do_vgGetParent(VGImage image); |
|
94 IMPORT_C void do_vgCopyImage(VGImage dst, VGint dx, VGint dy ,VGImage src, VGint sx, VGint sy ,VGint width, VGint height ,VGboolean dither); |
|
95 IMPORT_C void do_vgDrawImage(VGImage image); |
|
96 IMPORT_C void do_vgSetPixels(VGint dx, VGint dy ,VGImage src, VGint sx, VGint sy ,VGint width, VGint height); |
|
97 IMPORT_C void do_vgWritePixels(const void* data, VGint dataStride ,VGImageFormat dataFormat ,VGint dx, VGint dy ,VGint width, VGint height); |
|
98 IMPORT_C void do_vgGetPixels(VGImage dst, VGint dx, VGint dy ,VGint sx, VGint sy ,VGint width, VGint height); |
|
99 IMPORT_C void do_vgReadPixels(void* data, VGint dataStride ,VGImageFormat dataFormat ,VGint sx, VGint sy ,VGint width, VGint height); |
|
100 IMPORT_C void do_vgCopyPixels(VGint dx, VGint dy ,VGint sx, VGint sy ,VGint width, VGint height); |
|
101 IMPORT_C VGFont do_vgCreateFont(VGint glyphCapacityHint); |
|
102 IMPORT_C void do_vgDestroyFont(VGFont font); |
|
103 IMPORT_C void do_vgSetGlyphToPath(VGFont font ,VGuint glyphIndex ,VGPath path ,VGboolean isHinted ,const VGfloat glyphOrigin [2] ,const VGfloat escapement[2]); |
|
104 IMPORT_C void do_vgSetGlyphToImage(VGFont font ,VGuint glyphIndex ,VGImage image ,const VGfloat glyphOrigin [2] ,const VGfloat escapement[2]); |
|
105 IMPORT_C void do_vgClearGlyph(VGFont font ,VGuint glyphIndex); |
|
106 IMPORT_C void do_vgDrawGlyph(VGFont font ,VGuint glyphIndex ,VGbitfield paintModes ,VGboolean allowAutoHinting); |
|
107 IMPORT_C void do_vgDrawGlyphs(VGFont font ,VGint glyphCount ,const VGuint* glyphIndices ,const VGfloat* adjustments_x ,const VGfloat* adjustments_y ,VGbitfield paintModes ,VGboolean allowAutoHinting); |
|
108 IMPORT_C void do_vgColorMatrix(VGImage dst, VGImage src ,const VGfloat* matrix); |
|
109 IMPORT_C void do_vgConvolve(VGImage dst, VGImage src ,VGint kernelWidth, VGint kernelHeight ,VGint shiftX, VGint shiftY ,const VGshort* kernel ,VGfloat scale ,VGfloat bias ,VGTilingMode tilingMode); |
|
110 IMPORT_C void do_vgSeparableConvolve(VGImage dst, VGImage src ,VGint kernelWidth ,VGint kernelHeight ,VGint shiftX, VGint shiftY ,const VGshort* kernelX ,const VGshort* kernelY ,VGfloat scale ,VGfloat bias ,VGTilingMode tilingMode); |
|
111 IMPORT_C void do_vgGaussianBlur(VGImage dst, VGImage src ,VGfloat stdDeviationX ,VGfloat stdDeviationY ,VGTilingMode tilingMode); |
|
112 IMPORT_C void do_vgLookup(VGImage dst, VGImage src ,const VGubyte* redLUT ,const VGubyte* greenLUT ,const VGubyte* blueLUT ,const VGubyte* alphaLUT ,VGboolean outputLinear ,VGboolean outputPremultiplied); |
|
113 IMPORT_C void do_vgLookupSingle(VGImage dst, VGImage src ,const VGuint* lookupTable ,VGImageChannel sourceChannel ,VGboolean outputLinear ,VGboolean outputPremultiplied); |
|
114 IMPORT_C VGHardwareQueryResult do_vgHardwareQuery(VGHardwareQueryType key ,VGint setting); |
|
115 IMPORT_C const VGubyte * do_vgGetString(VGStringID name); |
|
116 |
|
117 #endif |