Circular Confusion

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
racarate
Prole
Posts: 34
Joined: Wed May 02, 2012 12:37 pm

Circular Confusion

Post 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
Kyle
Party member
Posts: 146
Joined: Sat Mar 16, 2013 9:46 pm

Re: Circular Confusion

Post 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.)
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Circular Confusion

Post 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
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Circular Confusion

Post 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:
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 8 guests