Circle? Box?

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
Chris016
Prole
Posts: 22
Joined: Sat Aug 16, 2008 1:58 am

Circle? Box?

Post by Chris016 »

Idk what to do to remove the box, Does it require any work to fix on art side? or code? all suggestions help. I use paint to make it so idk lol
Attachments
Error.PNG
Error.PNG (24.13 KiB) Viewed 4507 times
User avatar
counterfactual_jones
Prole
Posts: 24
Joined: Mon Feb 09, 2009 10:14 am

Re: Circle? Box?

Post by counterfactual_jones »

Your image doesn't have any alpha - along with red green and blue, images sometimes contain an alpha channel to store information about transparency. Love doesn't (at the moment) seem to support colour keyed images - images where you pick a certain colour which then becomes transparent.

However - if all you want is a circle then BEHOLD:

Code: Select all

love.graphics.circle(0, x, y, radius)  -- 0 for filled circle
love.graphics.circle(1, x, y, radius)  -- 1 for unfilled circle 
love.graphics.circle(1, x, y, radius, sides)  -- number of sides can be specified if the default is too blocky 
User avatar
Tabasco
Citizen
Posts: 72
Joined: Tue Dec 02, 2008 5:04 pm

Re: Circle? Box?

Post by Tabasco »

counterfactual_jones wrote:Your image doesn't have any alpha - along with red green and blue, images sometimes contain an alpha channel to store information about transparency. Love doesn't (at the moment) seem to support colour keyed images - images where you pick a certain colour which then becomes transparent.

However - if all you want is a circle then BEHOLD:

Code: Select all

love.graphics.circle(0, x, y, radius)  -- 0 for filled circle
love.graphics.circle(1, x, y, radius)  -- 1 for unfilled circle 
love.graphics.circle(1, x, y, radius, sides)  -- number of sides can be specified if the default is too blocky 
This is all great information, but you might be wise to use love.draw_fill and love.draw_line enumerators instead of 0 and 1.

Code: Select all

love.graphics.circle(love.draw_fill, x, y, radius, sides)
A complete list of constants can be found here:
http://love2d.org/docs/Constants.html

I might also recommend the GIMP for creating graphics. It's free and supports the PNG format (among many, many others), which is good for alpha.
http://www.gimp.org
User avatar
counterfactual_jones
Prole
Posts: 24
Joined: Mon Feb 09, 2009 10:14 am

Re: Circle? Box?

Post by counterfactual_jones »

Tabasco wrote: This is all great information, but you might be wise to use love.draw_fill and love.draw_line enumerators instead of 0 and 1.
Aha! I knew there must be constants somewhere! Thank you, I couldn't find any in the docs for the Circle function.
Broncheabones
Prole
Posts: 15
Joined: Wed Feb 04, 2009 5:25 am

Re: Circle? Box?

Post by Broncheabones »

Tabasco wrote:
counterfactual_jones wrote:I might also recommend the GIMP for creating graphics. It's free and supports the PNG format (among many, many others), which is good for alpha.
http://www.gimp.org
I personally prefer paint.net which can be found here: http://www.paint.net/

It's really simple IMO.
User avatar
Skofo
Party member
Posts: 146
Joined: Mon Dec 22, 2008 10:55 pm

Re: Circle? Box?

Post by Skofo »

Broncheabones wrote:
Tabasco wrote:
counterfactual_jones wrote:I might also recommend the GIMP for creating graphics. It's free and supports the PNG format (among many, many others), which is good for alpha.
http://www.gimp.org
I personally prefer paint.net which can be found here: http://www.paint.net/

It's really simple IMO.
And Windows-only. ;)
Working on: Viator
Need a 64-bit Debian package for LÖVE? Here it is!
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Circle? Box?

Post by osgeld »

and if you ever get past ms paint complexity then you have to dig around in forums for plugin support (but hey, who uses psd files anyway when their working on a image)

its ok, its lacking a lot, so if you want something thats a bit more than ms pain thats probably it

and with any image editor the ease is how much effort you put into it, i find paint.net much harder than the gimp, cause i have not put much if any effort into using it
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Hydrogen Maniac and 59 guests