Forum Archive

2D draw pixel by pixel is impossible?

xan273

hello , I am trying to create some old school effects with pythonista (plasma,fire etc) but i cant draw pixel by pixel using the scene library. Someone have an idea how to do that?

ccc

https://forum.omz-software.com/topic/500/what-is-the-best-way-to-plot-pixel-by-pixel

omz

Another option would be to just use the scene.rect function for every pixel. Performance will probably not be good enough that you can actually draw a rectangle for every pixel on the screen (especially on a retina screen), but you could use larger squares to get a pixellated look, or just draw within a smaller area.

xan273

the first method is good but I don t understand how create a simple animation. Any simple example?

ccc

You could create multiple frames in an animated gif https://forum.omz-software.com/topic/2052/gif-art-in-python

xan273

yes this a work around, i would like to have a minimun of interation with what i draw... Using the first solution it' s impossible to draw it on screen ?

ccc

Try @omz's suggestion. That lets you draw directly to the screen.