Page 1 of 1

[solved] Canvas:renderTo with arguments

Posted: Sat Jun 22, 2024 9:19 am
by BrotSagtMist
I am trying to draw a circle directly to a canvas. Like

Code: Select all

canvas=love.graphics.newCanvas()
canvas:renderTo(love.graphics.circle,"fill",9,9,9)
The wiki states:
Canvas:renderTo( func, ... )
is the syntax, assuming that means func is called with ... as its arguments.
But regardless of what is written there, i am always getting Error: bad argument #1 to '?' (string expected, got no value)
Am i dumb or is this a bug?

Re: Canvas:renderTo with arguments

Posted: Sat Jun 22, 2024 10:33 am
by pgimeno
If you are using 11.5, then it is a bug. Otherwise it's normal. According to the wiki, the `...` arguments are only supported from 11.5 on. I don't have 11.5 installed yet, so I can't test it.

Re: Canvas:renderTo with arguments

Posted: Sat Jun 22, 2024 12:08 pm
by BrotSagtMist
Oh, i see, no i have 11.4.
I actually checked for version in the wiki first thing and the ... syntax is also listed there, i was unaware its not actually working.
Thanks.