The cairo_matrix_multiply(out,a,b) docs say that it is equivalent to applying
matrix a first, followed by b. Looking at _cairo_gstate_backend_to_user() we should
apply device_transform_inverse followed by ctm_inverse. That's what we do now.
This patch adds cairo_surface_copy_page and cairo_surface_show_page
as public methods, leaving the previous cairo_show_page variants as
shorthands. copy_page/show_page are specific to the surface, not
to the context, so they need to be surface methods.
The BC (background color) in the smask of the recently added
cairo_mask() support was causing Ghostscript to crash due to the wrong
number of BC values. The BC entry has been removed as BC default color
is already what we want.
Under rare circumstances we may need to extract a surface that
represents a bitmap with width==0 and rows==0. Detect this case at the
start and simply return a zero-sized surface.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12284.
This does introduce some reported failures from the cairo-pdf backend
into the test suite. However, in all cases the output PDF files look
fine when viewed with acroread. It looks like all of the problems
could be fixed by using cairo_rectangle;cairo_fill along with
CAIRO_EXTEND_PAD when drawing images with cairo inside poppler.
However, I'm not yet filing a bug against poppler and disabling these
tests because we need to _implement_ CAIRO_EXTEND_PAD before we can
tell poppler to start using it.
This test demonstrates a bug when compositing an rgb24 image over an argb32
image, (the implementation appears to be examining the alpha channel
rather than ignoring it).
The optimization that avoids replaying commands prior to an unclipped
CLEAR operation now starts playback from the first command after the
CLEAR. This avoids the need to handle the unclipped CLEAR in the PDF
surface.
As opposed to the CAIRO_TEST_TARGET env var which lists the exact
targets to test, CAIRO_TEST_TARGET_EXCLUDE instead supplies a list of
targets to filter from the testing set. This is useful under
circumstances where the build environment prevents testing of a target,
for example no DirectFB support or the glitz library is broken, but where
you still want to perform the minimal check that the code compiles.
This reverts commit 919bea6dbb.
Sadly as Behdad points out some backends do modify the glyph array and,
for example cairo-xlib-surface, hide this from the compiler with some
evil casts.
Skip the memory duplication of the incoming glyphs if we do not need
to transform them into the backend coordinate system.
As a consequence we need to constify the glyphs passed to the backend
functions.
These are failing due to (already reported) poppler bugs.
There were also problems with the gradients in the PDF
files previously, but these have recently been fixed.
The PDF surface was adding extra stops at the 0.0 and 1.0 offset when
there was not already stops at these offsets. This has been replaced
with code to move the coordinates of the linear gradient line in to
the position of the first and last offset.
If scaled_font_destroy() is called, a deadlock can result; there's no
reason to call destroy since the initialization failed (and, indeed,
it might not be valid to do so anyway).
Patch from: Robert O'Callahan <roc@ocallahans.org>
Add cairo_win32_font_face_create_for_logfontw_hfont, allow win32
scaled_fonts to rescale themselves properly to the required CTM and
only use the font_face's hfont if we're sure it's appropriate.
The following 7 tests currently fail with poppler due to:
Poppler does not correctly handle knockout groups
https://bugs.freedesktop.org/show_bug.cgi?id=12185
and we've verified with acroread that the cairo-pdf output
does render as intended there. The disabled tests are
clip-operator, operator-clear, operator-source, over-above-source,
over-around-source, over-below-source, and over-between-source.
The stream handling has been changed to support writing the content to
one or more group objects. Each page has a top level knockout
group. The first operation in the knockout group paints another group
containing the content. Fallback images are painted from the knockout
group. This ensures that fallback images do not composite with any
content under the image.
These are useful programs, but they don't belong in test/.
They are never used in the test suite at all. Instead, these
should exist in some demo package, or as applications in their
own right.
(The motivation for the removal is that someone just encountered
a build error with one of these. And I'm not interested in debugging
build errors for unused components.)
A pixman bug had kept this from being correct earlier. It
works now as long as pixman includes the following fix:
8ff7213f39edc1b2b8b60d6b0cc5d5f14ca1928d
rasterize traps that extend outside of the image bounds correctly
I've been seeing failures with the PS backend for these tests
for a while. This is in spite of the face that we've had a PS-
specific reference image for each of these tests. I'm not sure
what the difference is between my current system and the
system used to generate the original ps-specific reference
images.
One thing we definitely need to do is to bundle fonts with the
test suite to avoid problems like this. Another is to start
documenting the systems used to generate reference images.
I get very confused with ghostscript versioning, but I can
at least say that "gs --version" reports 8.15.3 here, (though
the package appears to have an 8.56 version).