This was recently broken in commit 40d5082c24
which uses a base85-stream but without strings for encapsulating image
data. The bug was that the protection for ~> was only being applied
to the string encodings rather than all base85 streams.
We got lucky recently that the 24.8 change just happened to put the ~>
sequence on the line-wrap boundary so the test suite tripped up the
bug. Otherwise, we could have missed this for quite some time.
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).
The rectangle_int16_t usage was causing failures on 24.8 (due to a wrong
pointer used to get_extents); I removed all the specific int16/int32 typedefs
to avoid this situation in the future.
Propagate the true status value back from the _cairo_gstate_init_copy()
instead of assuming that is a NO_MEMORY and re-raising the error in the
caller.
I was wrong in my assertion that the call to
_cairo_path_fixed_interpret_flat() could not possibly fail with the
given _cairo_path_bounder_* callbacks - as I had missed the implicit
spline decomposition. (An interesting exercise would be to avoid the
spline allocation...) As a result we do have to check and propagate the
status return through the call stack.
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.
Modify cairo-pdf-operators.c to emit to 're' path operator when the
path contains only a rectangle. This can only be done when the path is
logically equivilent to the the path drawn by the 're'
operator. Otherwise dashed strokes may start on the wrong line.
ie the path must be equivalent to:
cairo_move_to (cr, x, y);
cairo_rel_line_to (cr, width, 0);
cairo_rel_line_to (cr, 0, height);
cairo_rel_line_to (cr, -width, 0);
cairo_close_path (cr);
which is also equivilent to cairo_rectangle().
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.
The surface size and clip needs to be saved before and restored after
replaying meta surface patterns back to the analysis surface. The clip
is reset and the correct surface size is set before replaying the meta
surface.
The FT_Set_Char_Size() docs say it replaces sizes smaller than 1.0 with 1.0.
So, we can't use x_scale and y_scale values less than one. The fix is easy thouh,
cap them to 1.0 and let the FT transform do the scaling down.
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
For A8 and A1 masks, the embedded mask image doesn't have an alpha channel.
In this case, the feColorMatrix should not be used, since it's goal is to
discard the color channels and to only keep the alpha one (which is what
we want when we have an ARGB32 mask image, since SVG uses all the channels
for the mask operation, where cairo only use the alpha channel).
SVG doesn't support extend reflect for image pattern, and there isn't
any trivial way to emulate this feature. So we use the image fallback
for now. This fix also forces an image fallback for extend-reflect, but
in the end, it generates more or less the same file (one big image for
the pattern). No other test is forced to use an image fallback by this
patch.
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.