About patterns in cells and graphs



Hi,

I am currently working on using patterns as background in graphs. I would like to know if somebody has an opinion about the usefulness to allow transparency either for the back or the fore color. It is quite possible to do that, just writing a helper function is necessary.

About printing the patterns, it is more difficult, because there is no appropriate function in gnome-print although patterns exist both in Postscript and PDF; probably someone (I?) should write the corresponding code and submit the patch to libgnomeprint (not before 2.5 now). At the moment, what is possibe to do is filling a pixbuf with the pattern and print the pixbuf. This is not without problem. The most obvious is a resolution one. Gnome-print use 72 dpi, while Gnumeric uses a resolution in its configuration, default being 96 dpi. If we want a wisiwig printout, we must adapt the size of the pattern, but unfortunately, the GogRenderer does not know anything about resolution. One size is passed when rendering on the screen and another when printing. Any idea?

Also, before writing the code, I looked at the corresponding code for cells background. I found one problem: if the pattern is not solid or grey, the cell is printed as a black rectangle since gnome_print_setrgbcolor is not called. I suggest to use the back color in such cases.

Best regards,

Jean





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]