From: Bogdan M. <bog...@gm...> - 2004-07-26 07:01:11
|
Hi John, I'm sending the code as an attachement, as it is 215 lines long and some of them could wrap. Some thoughts about the code: in order to test it just modify the definitions of IMAGE_FILE and (maybe) PRINT_DPI. Then start the program and use "print" and "preview" from the "file" menu. The preview doesn't look like the original plot (at least on the machines I tested it), and I don't know why. The colors seem to be twisted or something in the preview. If somebody has any clues about this, I'd be more than happy to know. However, this is only a preview problem, the print itself looks fine. Don't expect the code to run on the current "official" version of wxPython (2.5.1.5); download the 2.5.2.2 test release (or a more recent version) from http://starship.python.net/crew/robind/wxPython/daily/20040722/. Only tested on WinXP and Win2000 with the WXAgg backend, I don't know anything about the other platforms or backends, if someone else could test this it would be great. This could certainly be improved by telling the backend what wxDC it should use to draw the image on (thus skipping the save image/load image step), but so far I believe this is a good solution. John, I have some comments on the wx / wxAgg backends; I've been able to totally eliminate the very annoying flicker that I got when moving a window on a plot canvas. I guess that the dev list would be a better place for these comments, right? -- Bogdan |