Following tutorials, setColor affecting image???

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
ShadowProtocol
Prole
Posts: 15
Joined: Thu Nov 25, 2010 9:41 pm

Following tutorials, setColor affecting image???

Post by ShadowProtocol »

Hi, I'm following the tutorials in the order I think they are most beneficial:
-Getting Started
-Callback Functions
-Drawing Order
-Fonts and Text
-Image Loading, Key Movement (Hamster Ball)
-Using Input

I am on callback functions now, and the example for the love.load() function is:

Code: Select all

image = love.graphics.newImage("bluesquare.png")
	local f = love.graphics.newFont(12)
	love.graphics.setFont(f)
	love.graphics.setColor(0, 0, 0, 255)
	love.graphics.setBackgroundColor(255, 255, 255)
Why is setColor affecting the way my image is drawn? How do you color text without affecting everything else?
User avatar
Mud
Citizen
Posts: 98
Joined: Fri Nov 05, 2010 4:54 am

Re: Following tutorials, setColor affecting image???

Post by Mud »

User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Following tutorials, setColor affecting image???

Post by bartbes »

Or you can just set the color to white if you want your images in their normal color (255, 255, 255, 255 is fully opaque white).
Post Reply

Who is online

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