First of all, many thanks for this excellent program, and the amazing level of support.
I found a (minor) bug concerning the constants WIDTH and HEIGHT while using setContext()
By the way, i have Codea 1.4.1 and an ipad 1.
What happens is that in fullscreen mode width and height don’t hold the correct value if I use setcontext.
If I press the reset button (circular arrow on the bottom) then everything is alright again. next time I run the code however the problem returns.
here’s he minimum code needed to reproduce the behavior:
It’s supposed to draw one line completely from top-left to bottom-right, however the first time it draws it top-left to somewhere mid-right
function setup()
displayMode(FULLSCREEN)
img = image(WIDTH,HEIGHT)
setContext(img)
stroke(255,255,255,255)
strokeWidth(5)
line(0,0,WIDTH,HEIGHT)
setContext()
end
function draw()
background(0,0,0,255)
stroke(255,255,255,255)
strokeWidth(5)
line(0,HEIGHT,WIDTH,0)
end
If you comment out the line(0,0,WIDTH,HEIGHT) part in the setup the bug is gone.
Is it an error in my code or is something wrong with Codea?