Page 1 of 1

Circular Confusion

Posted: Mon Mar 18, 2013 1:13 am
by racarate
So, I'm trying to use LOVE to reproduce some figures in my geometry book and I can't understand what's going on with love.graphics.arc.

It seems like it draws a segment, that is a piece of pie. I thought that setting radius to zero might make it draw just the arc, but no luck.

Is there any way to draw *just* the portion or the circle that I want (like a rainbow)?


-Nick

Re: Circular Confusion

Posted: Mon Mar 18, 2013 2:04 am
by Kyle
Nope. That function is curiously missing that. I ran into the same problem the other day. You can, however, create your own arc function that would simply draw a number of lines, since that's all love.graphics.arc does anyway (the segments argument actually defines how many lines to do.)

Re: Circular Confusion

Posted: Mon Mar 18, 2013 9:12 am
by micha
This question has popped up before. The arc function draws the radii, as well. If you want it without, at the moment you have to write something on your own. I did this you can use the function from this thread:
viewtopic.php?f=4&t=12305&p=73700&hilit=circle#p73721

Re: Circular Confusion

Posted: Mon Mar 18, 2013 1:09 pm
by T-Bone
It's pretty easy to implement on your own. Although for a 2D graphics framework I guess you could expect it to be included.

A fun and ugly solution is to use a combination of line circles and love.graphics.setScissor :neko: