Re: GtkPrintOperation and margins



 Hello Ian.
I don't use GTK 2.10 yet but AFAIK when you are producing a Postscript file you do everything with a resolution of 72dpi, that is, in Adobe point units (1pt = 1/72 inches); so, you position everything with 72dpi precision, though, when you embed a bitmap image, that image will use whatever DPI the printer has; I think with Cairo thats called the "fallback resolution". My hope is that GTK sets a correctly configured Cairo context with the correct fallback resolution suitable for the printer but with a resolution of 72dpi for positioning and text. You may change the Cairo Current Transformation Matrix (CTM) to scale everything by 1/72 so that you work with inches, that should be far more intuitive and easy. The Postscript interpreter will correctly render the curves, segments, fonts, etc. with the dpi of the printer and the images will be stored with the dpi of the printer. So, maybe this isn't a bug but a misunderstanding, I didn't read the GTK 2.10 documentation about printing yet though maybe it can be improved.
It would be nice for someone more experienced in this topic to confirm this.
HTH, bye! :)



El 30/11/06 16:55, Ian Puleston escribi� Another bug that I noticed whilst working on this is that I initially tried
to work in pixels rather than inches, so I tried to extract the print margin
size in pixels by:

    margin = gtk_page_setup_get_top_margin(pageSetup, GTK_UNIT_PIXEL);

And with a 1" top margin this returned the value 72. With a 300dpi printer
that should have returned 300 - it has actually returned the point size
rather than pixel size (as if I'd called it with GTK_UNIT_POINT).

I will submit a bug report on this too if thats not already been done.




_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list


--
Ivan Baldo - ibaldo adinet com uy - http://ibaldo.codigolibre.net/
ICQ 10215364 - Phone/FAX (598) (2) 613 3223.
Caldas 1781, Malvin, Montevideo, Uruguay, South America.
We believe that we are free, but in reality we are not! Are we?
Alternatives: ibaldo codigolibre net - http://go.to/ibaldo





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