The additional 8 bits of integer allows device space to be 256
times larger before applications need to start worrying about
any issues with overflow. So this should help in many cases.
And the loss of 8 bits of sub-pixel precision shouldn't cause
any harm at all---16 was really much more than necessary.
With this change the details of rasterization for several tests
are changed slightly, (particularly on arcs, for example), so
many reference images are updated here.
NOTE: This change is currently breaking get-path-extents for
ps/pdf/svg as well as push-group for ps. We do not yet know
the reasons for these new failures.
This test isn't generating any image output, so it's silly to
have a 60x60 reference image for that. Not only that, but the
rgb24 cases have always been failing due to a missing rgb24-
specific reference image, (but pdiff had been hiding that).
Parts of the stroker depend upon whether we have in effect a reflection
matrix (one whose determinant < 0). This test incopororates the same
drawing under the a couple of reflections to exercise stroking under
matrices with both positive and negative determinants.
Draw a few rectangles whose vertices are outside the bounds of the
surface, but whose segments cross the surface. This exercises the new
dashed stroker optimisation which tries to determine whether the line
segment is visible.
pdiff was hiding a rgb24 failure here, as the test was drawing using
black ink on the default black background. Instead, explicitly fill
the surface with white first.
This is justified by the previously mentioned bug on poppler
gradients. Note that this test only passes with a patch
to fix a bug in poppler (not yet upstream). Here it is:
PATCH: Keep 'cairo_shape' and 'cairo' consistent
https://bugs.freedesktop.org/show_bug.cgi?id=14593
I was wrong in the previous message where I said I had ghostscript 8.61
installed. I do now, (and "gs --version" says the same thing), and
here are the new reference images.
Presumably these are due to ghostscript version churn. I don't
know what version was used in the past, but we're going to be
more careful about documenting versions now.
The ghostscript package I used here advertises itself as "8.61"
and "gs --version" reports 8.15.3.
This one doesn't have any associated poppler bug report. The
rendering by poppler is totally reasonable, and not problematic
at all with respect to what the test is actually testing for.
This is justified by the following new bug report:
Poppler should paint images with CAIRO_EXTEND_PAD
https://bugs.freedesktop.org/show_bug.cgi?id=14578
The four affected tests are:
paint-source-alpha
paint-with-alpha
rotate-image-surface-paint
scale-source-surface-paint
We had several pdf tests disabled waiting for this bug fix:
Poppler does not correctly handle knockout groups
https://bugs.freedesktop.org/show_bug.cgi?id=12185
That's in place for poppler now, so we're turning the tests
back on. Some of the affected tests now pass perfectly:
over-above-source
over-around-source
over-below-source
over-between-source
Some just needed new reference images:
operator-clear
clip-operator-pdf-argb32
The remaining tests still fail, but none of the failures can
obviously be ascribed to just poppler problems:
clip-operator-pdf-rgb24
operator-source
unbounded-operator
The first two have some serious problems, while in the case
of unbounded-operator the problem is extremely minor (a white
grid appears in the background where the reference image is
all black).
This was triggering an infinite loop (with 24.8 fixed-point) just before
the previous fix.
NOTE: I usually put bug demonstrations just before the fixes, but this
one was quite harsh---not only was cairo looping infinitely, but it
was appending to an array on each iteration---so not kind at all.
Minor correction for a build failure on AIX:
"mozilla/gfx/cairo/cairo/src/cairo-gstate.c", line 45.43: 1506-294 (S)
Syntax error in expression on #if directive.
(Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=415867.)
In order to correctly report the error back to the user during the
creation of a scaled font, we need to support a nil object per error.
Instead of statically allocating all possible errors, lazily allocate
the nil object the first time we need to report a particular error.
This fixes the misreporting of an INVALID_MATRIX or NULL_POINTER that
are common user errors during the construction of a scaled font.
Partial revert of commit 0086db893c.
This is a follow to the earlier commit that allowed creation of scaled
fonts using a NULL font options (by interpreting the NULL as meaning
use the default options) to reflect the comments made by Behdad
(http://lists.cairographics.org/archives/cairo/2008-January/012714.html).
The intent is that the public font options getter/setter API has similar
defensive behaviour to that of the core objects - i.e. do not overwrite
the nil object and if the object is in error then return the default
value. For the indirect use of a NULL/nil font options (e.g. creation of
scaled fonts), then an error should be returned rather than crashing.
Inspired by bug 7362 (painting a glitz surface onto an xlib surface
crashes cairo) and the lack of coverage for
_cairo_paginated_surface_acquire_source_image(), these tests attempt
to use each backend as a source surface for all the other backends.
For example, this checks that one can construct a PS file ready for
printing and then copy that surface to an image/xlib for previewing.