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