I've posted a preliminary patch to allow TPad::Print to use the cairo
vector graphics library to produce PNGs in batch mode (without any X
display). The patch is extremely rough (and incomplete) as I'm not very
familiar with the TVirtualPS interface or with cairo, but it passes the
"squint and compare" test.
http://www.hep.utexas.edu/sno/root_cairo/
I'm curious as to some feedback from the ROOT developers:
This patch could be a little confusing to use since:
c1->Print("test.png")
invokes the usual XImage method, whereas
c1->Print("test.png", "cairo")
uses the cairo library.
2. Since the cflags and libs required to link to cairo can be kind of lengthy, I use pkg-config to get them rather than try to guess where they are or have the user input them. Is that acceptable? (It may cause problems for a windows build, where pkg-config would probably not be present.)
3. Fonts have been shrunk a little in this version because I had a problem with them running into the edges of boxes and such. I think this might be because the font cairo is using has a slightly wider spacing than the one ROOT uses. Out of curiosity, where is the width of a given text string calculated to decide on box sizes during histogram painting?
4. Any chance of including this in the ROOT distribution once I fix it up? :)
Bug reports and comments are welcome.
--- Stan SeibertReceived on Wed Apr 20 2005 - 05:37:26 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:07 MET