I'm an experienced software guy but a Pi noob. My goal is to use the Pi to drive a UI and from what I can see OpenVG is my best option. So of course that means I need to learn OpenVG. The downside to OpenVG is that it doesn't seem to have a huge following, or at least Google searches don't bring up too many examples and discussions.
I've started with some example code which I'm tweaking one item at a time to teach myself how to program OpenVG. At this point I seem to be stuck trying to rotate paths. I can rotate the entire display by using something like
Code: Select all
vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
VGPath path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_ALL);
vguEllipse(path, x, y, w, h);
setfill(fill);
setstroke(stroke, sw);
vgDrawPath(path, VG_FILL_PATH | VG_STROKE_PATH);
vgTranslate(width/2, height/2);
vgRotate(h);
vgTranslate(-width/2, -height/2);
vgDestroyPath(path);
Code: Select all
vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
Code: Select all
vgSeti(VG_MATRIX_MODE, VG_MATRIX_FILL_PAINT_TO_USER | VG_MATRIX_STROKE_PAINT_TO_USER);
Can anyone get me pointed in the right direction?