1

I'd like to code a small Python program to draw and visualize data from simulations.

It started with data that could fit in 512 pixels x 512 at most, and so I have a working version using PyGame, where I draw the pixels one by one on a window.

But now I would need to do the same for much larger pictures, up to 4096x4096. Being much larger than the resolution of my screen I was thinking that I would need a graphical output in fullscreen in which I could scroll up-down left-right; but PyGame doesn't seem to offer good support for this kind of things (specifically the scrolling in fullscreen). Are there other libraries in Python offering the possibility to draw pictures and to show them. Or at least drawing it a scratch file and then reading it with the local image viewer.

Learning is a mess
  • 7,479
  • 7
  • 35
  • 71
  • 1
    *but PyGame doesn't seem to offer good support for this kind of things (specifically the scrolling in fullscreen).* Why? What problems do you encounter? – sloth Apr 02 '14 at 18:15
  • 3
    If you want some sort of packaged solution for image scrolling, no, Pygame does not provide that. It does, however, allow you to create very large surfaces, and then manage your own scrolling logic which would move a rectangle around the large surface and blit this portion of the large surface onto the typical `screen` surface. You can see my solution from [this other post to get an idea of how you would begin.](http://stackoverflow.com/questions/20403675/how-to-create-a-4-way-split-screen-in-pygame/20405691#20405691) – Haz Apr 02 '14 at 21:17
  • Yep yep, what Haz said. Just to add that you don't have to blit the surface at (0,0). You could also blit it at say; (-2000,-450), thus changing the current area you are viewing. Control this principle with your programming logic and you're golden. – Maxwell Hayes Sep 17 '14 at 06:47

0 Answers0