SFML community forums

Help => Graphics => Topic started by: Chocolatesheep on July 05, 2012, 01:46:04 am

Title: noob help with drawing shapes and lines
Post by: Chocolatesheep on July 05, 2012, 01:46:04 am
So I have this sprite moving around the screen, and I wanted to draw the path it is taking, sort of like a trail that it's leaving behind. It's not going in a straight line, it's moving in irregular curved paths. I tried drawing it with sf::ConvexShape, but when I do that it connects the first and last point with a line creating a polygon. Well, no surprise there, it is called convexshape after all. I also played around with vertex arrays but I didn't manage to get it to work properly. Does someone have a simple solution for this. Basicly I need the convexshape without it being convex. Oh, and a follow up question. What are the primitives called quads? I get the lines and linestrip, but what are quads?

EDIT: I'm using SFML 2.0 on Windows
Title: Re: noob help with drawing shapes and lines
Post by: eXpl0it3r on July 05, 2012, 03:58:33 am
You can easily use a vertex array, just define it as connected lines and then set the points.