Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Can I use the line() function in a layer?
-
Is there any way to use the line() function in a layer? I want to be able draw lines on top of part of the screen, but not have to redraw everything underneath it. But I can't see how to constrain line() to one layer. Any suggestions?
-
You could use PIL to draw an image and then create a Pythonista scene.Layer which is right-sized to display that image. The layer will now know how to redraw itself without any special code in your scene.Scene.draw() method. See diagonal_line.py at https://gist.github.com/cclauss/8683457
-
Clever! Many thanks for the great suggestion and sample code.