&image_extra was being passed instead of image_extra to release; the
bug only manifested itself when the particular backend did something
with image_extra.
This demonstrates an error in cairo where miter joins are replaced with
bevels at high scale factors due to a test added to eliminate wild miters
drawn when the line faces are nearly parallel.
Do not return after encountering the first error whilst closing streams,
but continue to close any auxiliary streams before finally reporting the
error. Also during finalize check that we have closed any streams that
may have been left open after encountering an error.
Test for an invalid matrix before use. Whilst this has no effect on the
result, an INVALID_MATRIX error will be raised on the context, placing
the guards first makes the code obviously safe and avoids manipulation
of invalid matrices.
This was failing with more than one level of push/pop group. The
problem was that the meta surface replay in PS/PDF emit_meta_surface
was replaying all the meta surface commands insteads of only the
natively supported commands. The analysis surface has also been
changed to replay meta surface patterns back to the one analysis
surface instead of creating a separate analysis surface for each
pattern. The analysis surface now transforms bounding boxes with the
meta surface pattern matrix so that fallback regions are correctly
tracked.
Bug report and proposed patch at:
http://lists.cairographics.org/archives/cairo/2007-December/012529.html
On Windows the tmpfile() function creates the file in the root
directory. This will fail if the user does not have write access to the
root directory.
Implement _cairo_win32_tmpfile() that is #defined as tmpfile() on
Windows. This function uses GetTempPath() and GetTempFileName() to
create the temporary file. CreateFile() is used to open the file so
the DELETE_ON_CLOSE flag can be set.
By enlarging buf_size to ensure the correct alignment of the points
array with the cairo_path_buf_t block, we can efficiently use the
padding bytes to store more ops.
In http://bugs.gentoo.org/show_bug.cgi?id=203282, it was identified that
the cairo_path_buf was causing unaligned accesses (thus generating SIGBUS
on architectures like the SPARC) to its array of points. As we manually
allocate a single block of memory for the cairo_path_buf_t and its
arrays, we must also manually ensure correct alignment - as opposed to
cairo_path_buf_fixed_t for which the compiler automatically aligns the
embedded arrays.
cairo_get_target() returns the original surface passed to
cairo_create(), and not the current destination as required when
testing drawing to the same surface using multiple contexts.
For completeness we also use the group target when creating similar
surfaces within the tests (to check that similar surfaces of similar
surfaces also work).
If the backend does not support fallbacks ie backend->acquire_dest_image
or backend->acquire_source_image is NULL, then return
CAIRO_INT_STATUS_UNSUPPORTED rather than attempt to jump to the NULL
hooks.
To correctly copy a surface onto the destination irrespective of its
content requires the SOURCE operator. Forgetting to do so here causes
uninitialized pixels to be mixed into the result and the failure of
many tests for the similar surface. Oops...
Avoid returning uninitialized variables if we're asked to find the
bounds of an empty path - in which case we just return a rectangle
of zero width and height similar to the empty clip region.
In http://bugs.freedesktop.org/show_bug.cgi?id=13699, Pavel Vozenilek
reports a duplicate define for computing the appropriate length for an
on-stack array. The macro in question, and a few other places, was
performing CAIRO_STACK_BUF_SIZE/sizeof(stack[0]) so we can simplify
them slightly by using a common macro.
The reasoning for that commit was that fonts with bitmap strikes should be
rendered with antialiasing off for those (hopefully) few glyphs that don't
have a bitmap.
However, it turns out, there are fonts that have some, but very few, bitmaps,
and this changed forces non-AA rendering on them. We now support multiple
glyph formats per font in the Xlib backend, so backing this out to let every
glyph render as is. Fontconfig rules can be used to force AA off on a per-font
basis.
This reverts commit 06af5c2891.
We maintain three Xrender glyphsets per scaled font, one for each of A1, A8,
and ARGB32. This is required to correctly support fonts with bitmaps for
some glyphs but not all.
Added a couple of (boolean) env. vars affecting the backend:
CAIRO_DIRECTFB_NO_ACCEL, disables acceleration
CAIRO_DIRECTFB_ARGB_FONT, enables using ARGB fonts instead of A8