There few things that should be tidied up before this can be committed
to the 0.46 branch.
- I'll push out my cairo patch to the cairo repository in the next few
hours. Then Ishmal can do a cairo build from that. As the current cairo
snapshot (1.4.14) is the release candidate for 1.6.0 I need to do
further testing to make sure I have not broken anything before I push
out this patch.
- The workaround for using win32_printing_surface with gtkprint should
be made more robust. It should be changed to check of the surface
returned by gtkprint is of type CAIRO_SURFACE_TYPE_WIN32 before
substituting it with win32_printing_surface. That way the code will work
correctly if gtkprint returns some other surface like pdf. It will also
ensure that when gtkprint is fixed to use the surface of type
CAIRO_SURFACE_TYPE_WIN32_PRINTING, the workaround will be bypassed.
The problem with the low resolution fallback should be easily fixed by
changing the fallback resolution. Radial gradients are not supported by
GDI so they will always use fallback images. Linear gradients are only
supported on PostScript level 3 printers. Otherwise they will fallback
as well.
The cairo function for controlling the fallback resolution is:
It is in the patch but commented out. The default fallback resolution is
300dpi so that should not be causing the problem unless Inkscape is
changing it. The commented out line in the patch sets the fallback dpi
to the printer resolution. However the problem with doing this is with
higher resolutions (600dpi or more) you can easily run out of memory
when doing full page fallbacks. I would generally setting this to
between 150 to 300 dpi. Laser printers generally get a lot less
resolution when printing color than their native resolution due to the
half toning. For example my 600dpi laser prints grayscale at 120dpi.
The other source of low resolution bitmaps is the resolution that
Inkscape prints images at. I am not familiar with the Inkscape code so I
don't know what it is doing with images.
Rygle wrote: annarchy. freedesktop. org/~ajohnson/ cairo/ 046.print. patch" launchpadlibrar ian.net/ 12826073/ ink_win32. 046.print. patch
> Actually, I think I should nominate this now given the short deadline.
> The rest will have to wait for 0.46.1.
>
> The latest patch is attached.
>
> There are also some patched cairo libs that stop a crash. See here -
> http://
>
> ** Attachment added: "ink_win32.
> http://
>
There few things that should be tidied up before this can be committed
to the 0.46 branch.
- I'll push out my cairo patch to the cairo repository in the next few
hours. Then Ishmal can do a cairo build from that. As the current cairo
snapshot (1.4.14) is the release candidate for 1.6.0 I need to do
further testing to make sure I have not broken anything before I push
out this patch.
- The workaround for using win32_printing_ surface with gtkprint should TYPE_WIN32 before surface. That way the code will work TYPE_WIN32_ PRINTING, the workaround will be bypassed.
be made more robust. It should be changed to check of the surface
returned by gtkprint is of type CAIRO_SURFACE_
substituting it with win32_printing_
correctly if gtkprint returns some other surface like pdf. It will also
ensure that when gtkprint is fixed to use the surface of type
CAIRO_SURFACE_
eg
cairo_t *cr = gtk_print_ context_ get_cairo_ context (context); target( cr); surface_ get_type (surface) == CAIRO_SURFACE_ TYPE_WIN32) { surface_ get_dc (surface); win32_printing_ surface_ create (dc);
cairo_surface_t *surface = cairo_get_
#ifdef WIN32
+ if (cairo_
HDC dc = cairo_win32_
surface = _cairo_
+ }
#endif
bool ret = ctx->setSurface Target (surface, true);
The problem with the low resolution fallback should be easily fixed by
changing the fallback resolution. Radial gradients are not supported by
GDI so they will always use fallback images. Linear gradients are only
supported on PostScript level 3 printers. Otherwise they will fallback
as well.
The cairo function for controlling the fallback resolution is:
cairo_ surface_ set_fallback_ resolution (surface, x_dpi, y_dpi);
It is in the patch but commented out. The default fallback resolution is
300dpi so that should not be causing the problem unless Inkscape is
changing it. The commented out line in the patch sets the fallback dpi
to the printer resolution. However the problem with doing this is with
higher resolutions (600dpi or more) you can easily run out of memory
when doing full page fallbacks. I would generally setting this to
between 150 to 300 dpi. Laser printers generally get a lot less
resolution when printing color than their native resolution due to the
half toning. For example my 600dpi laser prints grayscale at 120dpi.
The other source of low resolution bitmaps is the resolution that
Inkscape prints images at. I am not familiar with the Inkscape code so I
don't know what it is doing with images.