|
| 1 | +ShivaVG |
| 2 | +============================= |
| 3 | + |
| 4 | +See AUTHORS for the list of contributors |
| 5 | + |
| 6 | +ShivaVG is an open-source LGPL ANSI C implementation of the Khronos |
| 7 | +Group OpenVG specification. |
| 8 | + |
| 9 | +I. BUILD |
| 10 | +II. TESTING |
| 11 | +III. IMPLEMENTATION STATUS |
| 12 | +IV. EXTENSIONS |
| 13 | + |
| 14 | + |
| 15 | +I. BUILD |
| 16 | +============================= |
| 17 | + |
| 18 | + * Prerequisites: |
| 19 | + |
| 20 | + OpenGL development libraries and headers should be installed. |
| 21 | + Othe than that, since it's ANSI C should compile with any modern |
| 22 | + C compiler. jpeglib needs to be installed for example programs |
| 23 | + that use images. |
| 24 | + |
| 25 | + * Compiling under UNIX systems: |
| 26 | + |
| 27 | + First run ./autogen.sh script to generate the required makefiles. |
| 28 | + Read the INSTALL file for more detailed (though generic) directions. |
| 29 | + This library uses the standard ./configure ; make. The example |
| 30 | + programs are automatically compiled. However, compilation of each |
| 31 | + example program can be toggled by ./configure --with-example-xxx |
| 32 | + command where xxx denotes the name of the example. Run ./configure |
| 33 | + --help for a list of such options. |
| 34 | + |
| 35 | + * Compiling on Mac: |
| 36 | + |
| 37 | + No XCode project files provided yet. The easiest way is by just |
| 38 | + using gcc, in which case look under UNIX compiling section. |
| 39 | + |
| 40 | + * Compiling natively on Windows platform: |
| 41 | + |
| 42 | + Solution files are provided for Visual C++ version 7 and 8. For |
| 43 | + the example programs using images to compile, you will need the |
| 44 | + appropriate build of jpeglib to match your Visual C++ version. |
| 45 | + |
| 46 | + * Compiling in mingw / cygwin environment: |
| 47 | + |
| 48 | + Might work just as fine as any UNIX-flavored system, but hasn't |
| 49 | + been tested yet. |
| 50 | + |
| 51 | + |
| 52 | +II. TESTING |
| 53 | +============================= |
| 54 | + |
| 55 | +There is no real testing suite yet. The example programs are there |
| 56 | +just to play with what the implementation can currently do, but |
| 57 | +can hardly provide any proper validation, since no reference images |
| 58 | +are provided. Here is a description of each example program and |
| 59 | +what features it highlights: |
| 60 | + |
| 61 | +* test_vgu |
| 62 | + |
| 63 | + Constructs some path primitives using the VGU API. |
| 64 | + |
| 65 | +* test_tiger |
| 66 | + |
| 67 | + The most simple performance test. It draws the well known svg |
| 68 | + tiger using just simple stroke and fill of solid colors. It |
| 69 | + consists of 240 paths. |
| 70 | + |
| 71 | +* test_dash |
| 72 | + |
| 73 | + Shows different stroke dashing modes. |
| 74 | + |
| 75 | +* test_linear |
| 76 | + |
| 77 | + A rectangle drawn using 3-color linear gradient fill paint |
| 78 | + |
| 79 | +* test_radial |
| 80 | + |
| 81 | + A rectangle drawn using 3-color radial gradient fill paint |
| 82 | + |
| 83 | +* test_interpolate |
| 84 | + |
| 85 | + Interpolates between two paths - an apple and a pear. |
| 86 | + |
| 87 | +* test_image |
| 88 | + |
| 89 | + Images are drawn using VG_DRAW_IMAGE_MULTIPLY image mode to be |
| 90 | + multiplied with radial gradient fill paint. |
| 91 | + |
| 92 | +* test_pattern |
| 93 | + |
| 94 | + An image is drawn in multiply mode with an image pattern fill |
| 95 | + paint. |
| 96 | + |
| 97 | + |
| 98 | +III. IMPLEMENTATION STATUS |
| 99 | +============================= |
| 100 | + |
| 101 | +Khronos states in the OpenVG specification, that the contexts for all |
| 102 | +their client APIs are expected to be created via the EGL API. Since |
| 103 | +EGL to use with ShivaVG has not been implemented yet, there is a set |
| 104 | +of extension functions provided for the task of creating, maintaining |
| 105 | +and destroying the OpenVG context. (See next section EXTENSIONS for |
| 106 | +details.) |
| 107 | + |
| 108 | +What follows is a description of which functions or to what extent |
| 109 | +a certain function has been implemented. When a function is marked |
| 110 | +as PARTIALLY implemented, the TODO file or the comments in the code |
| 111 | +itself would provide further clues. |
| 112 | + |
| 113 | + |
| 114 | +* General: |
| 115 | + |
| 116 | +vgGetError ............................ FULLY implemented |
| 117 | +vgFlush ............................... FULLY implemented |
| 118 | +vgFinish .............................. FULLY implemented |
| 119 | + |
| 120 | +* Getters and setters: |
| 121 | + |
| 122 | +vgSet ................................. FULLY implemented |
| 123 | +vgSeti ................................ FULLY implemented |
| 124 | +vgSetfv ............................... FULLY implemented |
| 125 | +vgSetiv ............................... FULLY implemented |
| 126 | +vgGetf ................................ FULLY implemented |
| 127 | +vgGeti ................................ FULLY implemented |
| 128 | +vgGetVectorSize ....................... FULLY implemented |
| 129 | +vgGetfv ............................... FULLY implemented |
| 130 | +vgGetiv ............................... FULLY implemented |
| 131 | +vgSetParameterf ....................... FULLY implemented |
| 132 | +vgSetParameteri ....................... FULLY implemented |
| 133 | +vgSetParameterfv ...................... FULLY implemented |
| 134 | +vgSetParameteriv ...................... FULLY implemented |
| 135 | +vgGetParameterf ....................... FULLY implemented |
| 136 | +vgGetParameteri ....................... FULLY implemented |
| 137 | +vgGetParameterVectorSize............... FULLY implemented |
| 138 | +vgGetParameterfv ...................... FULLY implemented |
| 139 | +vgGetParameteriv ...................... FULLY implemented |
| 140 | + |
| 141 | +* Matrix Manipulation: |
| 142 | + |
| 143 | +vgLoadIdentity ........................ FULLY implemented |
| 144 | +vgLoadMatrix .......................... FULLY implemented |
| 145 | +vgGetMatrix ........................... FULLY implemented |
| 146 | +vgMultMatrix .......................... FULLY implemented |
| 147 | +vgTranslate ........................... FULLY implemented |
| 148 | +vgScale ............................... FULLY implemented |
| 149 | +vgShear ............................... FULLY implemented |
| 150 | +vgRotate .............................. FULLY implemented |
| 151 | + |
| 152 | +* Masking and Clearing: |
| 153 | + |
| 154 | +vgMask ................................ NOT implemented |
| 155 | +vgClear ............................... FULLY implemented |
| 156 | + |
| 157 | +* Paths: |
| 158 | + |
| 159 | +vgCreatePath .......................... FULLY implemented |
| 160 | +vgClearPath ........................... FULLY implemented |
| 161 | +vgDestroyPath ......................... FULLY implemented |
| 162 | +vgRemovePathCapabilities .............. FULLY implemented |
| 163 | +vgGetPathCapabilities ................. FULLY implemented |
| 164 | +vgAppendPath .......................... FULLY implemented |
| 165 | +vgAppendPathData ...................... FULLY implemented |
| 166 | +vgModifyPathCoords .................... FULLY implemented |
| 167 | +vgTransformPath ....................... FULLY implemented |
| 168 | +vgInterpolatePath ..................... FULLY implemented |
| 169 | +vgPathLength .......................... NOT implemented |
| 170 | +vgPointAlongPath ...................... NOT implemented |
| 171 | +vgPathBounds .......................... FULLY implemented |
| 172 | +vgPathTransformedBounds ............... FULLY implemented |
| 173 | +vgDrawPath ............................ PARTIALLY implemented |
| 174 | + |
| 175 | +* Paint: |
| 176 | + |
| 177 | +vgCreatePaint ......................... FULLY implemented |
| 178 | +vgDestroyPaint ........................ FULLY implemented |
| 179 | +vgSetPaint ............................ FULLY implemented |
| 180 | +vgGetPaint ............................ FULLY implemented |
| 181 | +vgSetColor ............................ FULLY implemented |
| 182 | +vgGetColor ............................ FULLY implemented |
| 183 | +vgPaintPattern ........................ FULLY implemented |
| 184 | + |
| 185 | +* Images: |
| 186 | + |
| 187 | +vgCreateImage ......................... PARTIALLY implemented |
| 188 | +vgDestroyImage ........................ FULLY implemented |
| 189 | +vgClearImage .......................... FULLY implemented |
| 190 | +vgImageSubData ........................ PARTIALLY implemented |
| 191 | +vgGetImageSubData ..................... PARTIALLY implemented |
| 192 | +vgChildImage .......................... NOT implemented |
| 193 | +vgGetParent ........................... NOT implemented |
| 194 | +vgCopyImage ........................... FULLY implemented |
| 195 | +vgDrawImage ........................... PARTIALLY implemented |
| 196 | +vgSetPixels ........................... FULLY implemented |
| 197 | +vgWritePixels ......................... FULLY implemented |
| 198 | +vgGetPixels ........................... FULLY implemented |
| 199 | +vgReadPixels .......................... FULLY implemented |
| 200 | +vgCopyPixels .......................... FULLY implemented |
| 201 | + |
| 202 | +* Image Filters: |
| 203 | + |
| 204 | +vgColorMatrix ......................... NOT implemented |
| 205 | +vgConvolve ............................ NOT implemented |
| 206 | +vgSeparableConvolve ................... NOT implemented |
| 207 | +vgGaussianBlur ........................ NOT implemented |
| 208 | +vgLookup .............................. NOT implemented |
| 209 | +vgLookupSingle ........................ NOT implemented |
| 210 | + |
| 211 | +* Hardware Queries: |
| 212 | + |
| 213 | +vgHardwareQuery ....................... NOT implemented |
| 214 | + |
| 215 | +* Renderer and Extension Information: |
| 216 | + |
| 217 | +vgGetString ........................... FULLY implemented |
| 218 | + |
| 219 | +* VGU |
| 220 | + |
| 221 | +vguLine ............................... FULLY implemented |
| 222 | +vguPolygon ............................ FULLY implemented |
| 223 | +vguRect ............................... FULLY implemented |
| 224 | +vguRoundRect .......................... FULLY implemented |
| 225 | +vguEllipse ............................ FULLY implemented |
| 226 | +vguArc ................................ FULLY implemented |
| 227 | +vguComputeWarpQuadToSquare ............ NOT implemented |
| 228 | +vguComputeWarpSquareToQuad ............ NOT implemented |
| 229 | +vguComputeWarpQuadToQuad .............. NOT implemented |
| 230 | + |
| 231 | + |
| 232 | +IV. EXTENSIONS |
| 233 | +============================= |
| 234 | + |
| 235 | +There are three extensions to the API that manipulate the OpenVG |
| 236 | +context as a temporary replacement for EGL: |
| 237 | + |
| 238 | +VGboolean vgCreateContextSH(VGint width, VGint height) |
| 239 | + |
| 240 | + Creates an OpenVG context on top of an existing OpenGL context |
| 241 | + that should have been manually initialized by the user of the |
| 242 | + library. Width and height specify the size of the rendering |
| 243 | + surface. No multi-threading support has been implemented yet. |
| 244 | + The context is created once per process. |
| 245 | + |
| 246 | +void vgResizeSurfaceSH(VGint width, VGint height) |
| 247 | + |
| 248 | + Should be called whenever the size of the surface changes (e.g. |
| 249 | + the owner window of the OpenGL context is resized). |
| 250 | + |
| 251 | +void vgDestroyContextSH() |
| 252 | + |
| 253 | + Destroys the OpenVG context associated with the calling process. |
0 commit comments