Can anyone tell me why this doesn't draw a star with 5 equal sides? I can't
figure out what concept I have wrong.
Here's what I'm doing:
VGubyte close[] = {VG_CLOSE_PATH};
VGubyte cmds[] = {VG_LINE_TO_REL};
VGfloat coords[] = {200.0, 0.0};
VGImage star = vgCreatePath(...);
VGImage line = vgCreatePath(...);
vgAppendPathData(line, 1, cmds, coords);
vgSeti(VG_MATRIX_MODE, VG_MATRIX_PATH_USER_TO_SURFACE);
vgLoadIdentity();
for(i=0; i<4; i++)
{
vgTransformPath(star, line);
vgRotate(-144.0);
}
vgAppendPathData(star, 1, close, coords);
...
vgLoadIdentity();
vgTranslate(imgWidth/2, imgHeight/2);
vgDrawPath(star, VG_STROKE_PATH);
and I'm getting the attached image (why are the lengths messed up?):
http://www.nabble.com/file/p25050892/star.jpeg
--
View this message in context: http://www.nabble.com/OpenVG%3A-Why-is-this-not-a-star--tp25050892p25050892.html
Sent from the mesa3d-users mailing list archive at Nabble.com.
|