[cairo] Cairo PDF

William Temperley willtemperley at gmail.com
Fri Jun 17 02:31:35 PDT 2011


On 17 June 2011 05:08, Andrew Cowie <andrew at operationaldynamics.com> wrote:
> On Thu, 2011-06-16 at 14:52 +0100, William Temperley wrote:
>> > Cairo 1.10 PDF output sets the PDF interpolate flag for embedded images
>> > based on the filter set on the pattern using cairo_pattern_set_filter().
>> > The default filter causes the interpolate flag to be set to true.
>> >
>> > Your PDFs contain very low resolution images that are scaled up. With
>> > interpolate set to true you will get the blurry images. If you want the
>> > interpolation disabled, set the filter to CAIRO_FILTER_NEAREST.
>> >
>>
>> Thanks Adrian, I'll give that a whirl.  Looks like I'll have to add
>> the binding to cairo_pattern_set_filter in Java-Gnome myself.
>
> Shouldn't be too hard. Give me a shout on java-gnome-hackers list if you
> need any help. Look at revno 751 [both
>
> $ bzr log -n0 751
> $ bzr diff -c 751
>
> will be instructive] where we added the Extend and FillRule constants.
> Adding Filter will be much the same I expect.
>
> AfC
> Sydney
>

Thanks Andrew -

I've patched it already and it seems to be working:
    cr.getSource().setFilter(Filter.NEAREST)
did the job as Adrian suggested.

I'll give you a buzz on java-gnome-hackers about doing a proper patch.

Best,

Will


More information about the cairo mailing list