Page 1 of 1

[SOLVED] Pie wedges / Pie slices / Pie segments

Posted: Thu Jun 13, 2013 9:20 pm
by nordbjerg
Hey guys!

Could any of you help me out on rendering a pie wedge aka. a pie slice? I don't really know how to go about this. I would like to draw some influence from the C function pieslice(x, y, startAngle, endAngle, radius) for the syntax.

Thanks! :nyu:

TL;DR / Solution
davisdude wrote:love.graphics.arc.()
They have an example of how to draw pacman! :)

Re: Pie wedges / Pie slices

Posted: Thu Jun 13, 2013 9:56 pm
by davisdude
love.graphics.arc.()
They have an example of how to draw pacman! :)

Re: Pie wedges / Pie slices

Posted: Thu Jun 13, 2013 9:56 pm
by veethree
Perhaps you could use a polygon.

Re: Pie wedges / Pie slices

Posted: Thu Jun 13, 2013 10:02 pm
by nordbjerg
davisdude wrote:Check out the last argument of 'love.graphics.circle' (it's segments, by the way).
I am not sure that we are on the same page. :brows: I need to render something like this:

Image

Basically what I want to do, is make it so I can create nodes from other nodes. Each node has a specific size, which is also reflected in the size of the pie wedge, segment, slice, or whatever. :P
veethree wrote:Perhaps you could use a polygon.
I will definitely look into that. :)

Re: Pie wedges / Pie slices

Posted: Thu Jun 13, 2013 10:13 pm
by nordbjerg
davisdude wrote:love.graphics.arc.()
They have an example of how to draw pacman! :)
Yes! This is what I was looking for :awesome:

Thank you kindly, sir! :ultrahappy:

Re: [SOLVED] Pie wedges / Pie slices / Pie segments

Posted: Thu Jun 13, 2013 11:44 pm
by davisdude
No problem! :awesome: