Title says all. I'm trying to get a cool effect where my canvas (which coincidentally is the same size as my physics area) has a different colour than the rest of the background.
I suppose I could just add a rectangle the size of the canvas before everything else on the canvas, but I wanted to know if background colours are possible.
Thanks!
Can Canvasses have Background Colour?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- MicroMacro
- Citizen
- Posts: 92
- Joined: Fri May 30, 2014 2:30 am
- Location: Boston, MA, USA
- Contact:
Can Canvasses have Background Colour?
https://github.com/ebernerd- where you can find all my work.
Re: Can Canvasses have Background Colour?
There is a command to clear entire canvas to a solid color (and alpha) - [wiki]love.graphics.clear[/wiki].
If you wanted to know if Canvas objects have such property - no, they do not. Canvas is a region of VRAM with some contents, it doesn't have parameters beyond pixel format and resolution (also filtering type, since it also acts as a texture).
If you wanted to know if Canvas objects have such property - no, they do not. Canvas is a region of VRAM with some contents, it doesn't have parameters beyond pixel format and resolution (also filtering type, since it also acts as a texture).
- MicroMacro
- Citizen
- Posts: 92
- Joined: Fri May 30, 2014 2:30 am
- Location: Boston, MA, USA
- Contact:
Re: Can Canvasses have Background Colour?
Thanks! I already was using love.graphics.clear(), didn't know it could pass colours. Woop!
https://github.com/ebernerd- where you can find all my work.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Can Canvasses have Background Colour?
That's what the wiki's there for! [wiki]love.graphics.clear[/wiki]
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests