Comment 144 for bug 179988

Revision history for this message
Rygle (rygle) wrote :

For ui\dialog\print.cpp, I'm wondering about #ifdefs for the following

Should the ifdef be earlier here? Before the //ctx->setPSLevel? Or before the cairo_t?

============
- bool ret = ctx->setSurfaceTarget (cairo_get_target (gtk_print_context_get_cairo_context (context)), true);
- if (ret) {
+
+ // ctx->setPSLevel(CAIRO_PS_LEVEL_3);
+ ctx->setTextToPath(false);
+ ctx->setFilterToBitmap(true);
+ ctx->setBitmapResolution(72);
+
+ cairo_t *cr = gtk_print_context_get_cairo_context (context);
+ cairo_surface_t *surface = cairo_get_target(cr);
+#ifdef WIN32
+ if (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_WIN32) {
+ HDC dc = cairo_win32_surface_get_dc (surface);
+ surface = _cairo_win32_printing_surface_create (dc);
+ }
+#endif
+
+ bool ret = ctx->setSurfaceTarget (surface, true); if (ret) {
==========

And should there be an ifdef on this, since Linux are not having the issue with scaling?
========
+ gtk_print_operation_set_unit (_printop, GTK_UNIT_POINTS);
========