On Wed, 28 Jan 2004, Luc Lefebvre wrote: > There may be a better way to do this. One would think that the > scrolling could trigger a redraw that is updated by drawing new stuff in > the drawingarea. I'm not sure how to go about this without having the > associated drawingarea be of representative size. I may look into how > to change the scrollbar attributes so that the show the proper > proportions while the drawing area is the same size as the viewport (or > would I then need a viewport at all...).
You're on the right track with this. The DrawingArea should be only as large as the area you are viewing. The scrollbars should generate events which you capture. There functions to set the "thumb" are part of the GtkRange parent object of GtkScrollBar (ie. gtk_range_set_XXX). With that many points, you *really* want to be using PyOpenGL. Being able to simply set a transform matrix and then draw using the original data is going to be both A) easier to program and B) 10-100 times faster than doing floating point math in Python. Using PyOpenGL will also get a bunch of graphics details like point and line aliasing, line joining, clipping at the edges of the drawing area, etc. correct without any thought on your part. -a _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
