I have a fairly complex (static) backdrop image on top of which I draw some animation.
Because I do not understand exactly how Pythonista deals with objects in the draw() function of a scene, I would expect it to be a good idea to pre draw the backdrop to an image and then refresh this every frame.
However is that basicly necessary and a good idea ?
Secondly I am having a lot of trouble trying to define such an image.
The image creation goes fine but no matter what I try to draw, it allways ends up as a white rectangle.
Sorry to be a little un specific and not showing any code, but is there an example somewhere showing this for a scene setup() and draw() ?
On second thoughts, here are my code in the scene...
def setup(self):
global img
img = Image.new("RGB", (300,300))
draw = ImageDraw.Draw(img)
draw.line((0,0,200,200),fill=200)
del draw
def draw(self):
background(0.09,0.09,0.102)
global img
image('img',300,300,300,300)
Re Peter