diff options
author | Chia-I Wu <[email protected]> | 2010-04-01 14:20:24 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2010-04-01 22:25:48 +0800 |
commit | fc3ddd4b566380e7684c780450016e3e191a4160 (patch) | |
tree | 539e4eb39fb89a9ebb83116deef9c5d5ebc57e4d /progs/openvg/trivial/path3.c | |
parent | 7f231cab2b7c13ba70d6aa694f74b6d6eee6470f (diff) |
progs/openvg: Move OpenVG demos to a subdirectory of progs/egl.
That is, move
progs/openvg/demos to progs/egl/openvg,
progs/openvg/trivial to progs/egl/openvg/trivial.
Diffstat (limited to 'progs/openvg/trivial/path3.c')
-rw-r--r-- | progs/openvg/trivial/path3.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/progs/openvg/trivial/path3.c b/progs/openvg/trivial/path3.c deleted file mode 100644 index 5ce600f65aa..00000000000 --- a/progs/openvg/trivial/path3.c +++ /dev/null @@ -1,77 +0,0 @@ -#include "eglcommon.h" - -#include <VG/openvg.h> -#include <VG/vgu.h> -#include <stdio.h> -#include <math.h> -#include <stdlib.h> - -static void -init(void) -{ -} - -/* new window size or exposure */ -static void -reshape(int w, int h) -{ -} - - -static void -draw(void) -{ - VGint WINDSIZEX = window_width(); - VGint WINDSIZEY = window_height(); - VGPath path; - VGPaint paint; - - VGfloat clearColor[] = {1.0f, 1.0f, 1.0f, 0.0f};/* white color */ - VGfloat fillColor[] = {1.0f, 0.0f, 0.0f, 1.0f};/* red color */ - -#if 1 - VGubyte commands[4] = {VG_MOVE_TO_ABS, VG_LCWARC_TO_ABS, VG_SCWARC_TO_ABS, VG_CLOSE_PATH}; -#else - VGubyte commands[4] = {VG_MOVE_TO_ABS, VG_SCCWARC_TO_ABS, VG_LCCWARC_TO_ABS,VG_CLOSE_PATH}; -#endif - VGfloat coords[] = {32.0f, 0.0f, - -32.0f, -32.0f, 0.0f, 64.0f, 32.0f, - -32.0f, -32.0f, 0.0f, 32.0f, 0.0f}; - - - vgSetfv(VG_CLEAR_COLOR, 4, clearColor); - vgClear(0, 0, WINDSIZEX, WINDSIZEY); - vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_NONANTIALIASED); - - vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE); - vgLoadIdentity(); - //vgTranslate(32.0f, 32.0f); - - path = vgCreatePath( VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, - 1.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_ALL ); - if ( path == VG_INVALID_HANDLE ) { - return; - } - paint = vgCreatePaint(); - if ( paint == VG_INVALID_HANDLE ) { - vgDestroyPath(path); - return; - } - - vgAppendPathData(path, 4, commands, coords); - vgSetParameterfv(paint, VG_PAINT_COLOR, 4, fillColor); - vgSetParameteri( paint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR); - vgSetPaint(paint, VG_FILL_PATH); - vgDrawPath(path, VG_FILL_PATH); - - vgDestroyPath(path); - vgDestroyPaint(paint); -} - - -int main(int argc, char **argv) -{ - set_window_size(64, 64); - return run(argc, argv, init, reshape, - draw, 0); -} |