canvas and not functioning properly?

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
Posts: 22
Joined: Sat Jun 01, 2013 4:40 am

canvas and not functioning properly?

Post by immakinggames » Tue Jul 28, 2015 5:35 pm

In love.draw()

Code: Select all, 10)

randomCanvas =
why is it such that drawing randomCanvas doesn't translate? Only drawing the image directly translates things, and that seems really weird.

User avatar
Posts: 14
Joined: Mon Nov 24, 2014 9:31 pm

Re: canvas and not functioning prope

Post by DekuJuice » Tue Jul 28, 2015 9:03 pm

First off, you should not be calling from love.draw, just call it once and store it somewhere so you can reuse it later.

I'm not completely sure that I understand your issue, but from what I see:
immakinggames wrote:

Code: Select all, 10)

randomCanvas = --Since the translation is in effect, the image is being drawn at 10,10 --The translation is still in effect, meaning the canvas itself is drawn at 10,10, and the image drawn onto it is now at 20,20 --Draws the image at 10,10
When you're drawing to randomCanvas, the image is being translated twice, and when you're drawing it directly, it's only being translated once.

Post Reply

Who is online

Users browsing this forum: No registered users and 59 guests