Carl Worth wrote: > On Thu, 12 Jul 2007 11:35:25 -1000, Eric Firing wrote: >> Carl Worth wrote: >> [...] > Later, you said... > >> Aha! Cairo ps output is full of "initclip" commands, so it can't be >> converted to eps without substantial reworking. > > Oh, actually that should be really easy to get rid of. The cairo > semantics match PostScript's very closely: > > cairo_clip -> clip > cairo_reset_clip -> initclip > > So, the only problematic case is if the application is actually > calling cairo_reset_clip, (which could simply be made into an error > when targeting EPS). If the application isn't, and cairo is still > generating initclip in the PostScript output then it should be very > simple to fix that.
I have looked at the mpl cairo backend code and at the source code for the pycairo package that mpl uses, and I have not figured out where the initclip call is coming from; it does not appear to be anything explicit. reset_clip is wrapped by pycairo, but an example snippet that generates ps with an initclip does not include any call to reset_clip. Nor does the mpl backend. So I conclude that it is being generated implicitly. I have not checked for any of the other postscript commands that are not allowed in eps, and I really can't pursue this any farther. But thanks for the ideas and encouragement; and in turn, if you are interested, I certainly encourage you to pursue the better utilization of cairo in mpl. The author of the backend, as well as of pycairo, is Steve Chaplin. Eric ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel