Transparency

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
Neon
Prole
Posts: 16
Joined: Sun Apr 01, 2012 3:46 pm

Transparency

Post by Neon »

How do I make a drawn rectangle, or image slightly transparent? Can I?

Also, if you have any ideas for a GUI Library, I'd like to hear them.
User avatar
Camewel
Prole
Posts: 20
Joined: Thu Apr 19, 2012 5:58 pm

Re: Transparency

Post by Camewel »

You can use love.graphics.setColor as such.

Code: Select all

love.graphics.setColor(255,255,255,a) -- where a is the transparency between 0 and 255, with 0 being invisible and 255 being completely visible.
love.graphics.draw(image, x, y) -- draw your image.
love.graphics.setColor(255,255,255,255) --make other things completely visible after this point.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests