### Using Polyline

Posted:

**Sat Oct 07, 2017 1:16 am**I am working with a Raspberry Pi B+, trying to make an interactive display for a car I am building. I can draw text and rectangles with openVG, but several days of trying to draw polygons has ended with, uh, no polygons. Pointers are not my strong suit, so it is probably the problem.

I have the usual includes - like I said, text and rectangle work, and then the code

int main()

{

VGfloat *LX,*LY;

VGfloat Left_X[5] = {50,100,75,100,50};

VGfloat Left_Y[5] ={100,125,100,75,100};

VGint npt = 5;

LX = &Left_X[0];

LY = &Left_Y[0];

init(&width,&height);

Start(width,height);

Background(55,55,55,1);

Fills(0,255,0,1);

Polyline(LX,LY,npt);

End();

fgets(s,2,stdin);

finish();

exit(0);

}

Any help would be greatly appreciated,

David

I have the usual includes - like I said, text and rectangle work, and then the code

int main()

{

VGfloat *LX,*LY;

VGfloat Left_X[5] = {50,100,75,100,50};

VGfloat Left_Y[5] ={100,125,100,75,100};

VGint npt = 5;

LX = &Left_X[0];

LY = &Left_Y[0];

init(&width,&height);

Start(width,height);

Background(55,55,55,1);

Fills(0,255,0,1);

Polyline(LX,LY,npt);

End();

fgets(s,2,stdin);

finish();

exit(0);

}

Any help would be greatly appreciated,

David