Commit graph

4028 commits

Author SHA1 Message Date
Jonathan Gramain
5eae45c55b [cairo-gstate] Fix order of matrices in _cairo_gstate_backend_to_user_rectangle()
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.
2007-09-12 17:45:21 -04:00
Vladimir Vukicevic
f2910ad3e9 Update cairo-sections.txt 2007-09-11 13:32:26 -07:00
Vladimir Vukicevic
9e975757a2 Export cairo_surface_{copy,show}_page
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.
2007-09-11 13:30:35 -07:00
Vladimir Vukicevic
7dd05b7f86 [mlk] Free boxes in copy_rectangle_list on success
Fix memory leak when copy_rectangle_list is used.
2007-09-11 11:27:47 -07:00
Adrian Johnson
897350c6c5 PDF: Remove BC entry from Smask dictionary
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.
2007-09-09 19:11:12 +09:30
Adrian Johnson
909e0be241 Add PDF support for cairo_mask() 2007-09-09 11:20:02 +09:30
Chris Wilson
d62f886168 [cairo-ft-font] Early detection of a zero sized bitmap.
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.
2007-09-07 12:40:28 +01:00
Vladimir Vukicevic
d635e01033 Add b8g8r8 formats to cairo-image-surface
Add recognition code for x8b8g8r8 and a8b8g8r8 to cairo-image-surface.
(Used as the default for 24bpp by some older VNC servers.)
2007-09-06 12:56:59 -07:00
Carl Worth
3c01efb0ee Merge branch adrianj/pdf-meta-surface-pattern into cairo
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.
2007-09-05 14:41:01 -07:00
Carl Worth
0682b9a9c1 Add rgb24-ignore-alpha test
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).
2007-09-05 14:38:21 -07:00
Behdad Esfahbod
84a2c8968a [test,perf] Support TARGETS_EXCLUDE make variable 2007-09-05 12:38:27 -04:00
Adrian Johnson
1e21220f0e Create meta-surface source image with same content type as the
meta-surface
2007-09-05 22:53:43 +09:30
Adrian Johnson
875e32178e Eliminate unclipped CLEAR from meta-surface playback
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.
2007-09-05 22:51:13 +09:30
Adrian Johnson
d24f019101 Add support for PDF meta-surface patterns 2007-09-05 22:26:16 +09:30
Behdad Esfahbod
b85032584b [configure.in] Fix non-pkgconfig Xrender detection path (#4724) 2007-09-05 00:26:56 -04:00
Behdad Esfahbod
1d788da517 Merge branch 'no-xrender.h' into cairo 2007-09-04 19:12:48 -04:00
Behdad Esfahbod
e1819a24fb [cairo-xlib-xrender-private] Remove some protocol-specific macros 2007-09-04 19:12:14 -04:00
Behdad Esfahbod
5e09126ce1 [cairo-xlib-xrender-private] Add copyright/license info for copied files 2007-09-04 18:40:54 -04:00
Carl Worth
49ae376840 Fix error in description of cairo version numbers
And eliminate a bit of redundant text.
2007-09-04 11:37:46 -07:00
Chris Wilson
b60c0a672f [cairo-boilerplate] Introduce CAIRO_TEST_TARGET_EXCLUDE.
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.
2007-09-03 14:37:16 +01:00
Behdad Esfahbod
740fed62d2 [xlib] Make it compile without Xrender available at compile time (#12210) 2007-08-31 20:52:43 -04:00
Jody Goldberg
c8ed3e1827 [PDF] The symbol 'GROUP' is already used on some win32 systems; add a prefix 2007-08-31 17:00:36 -04:00
Chris Wilson
c14cf02f61 [cairo-surface] Add a comment about why the glyph array is not const.
As penance for attempting to make the glyph array constant, add a
comment block to explain that the backends rely on being able to modify
the array.
2007-08-31 17:21:02 +01:00
Chris Wilson
e8e3bfc130 Revert "[cairo-gstate] Avoid copying untransformed glyphs."
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.
2007-08-31 16:53:21 +01:00
Chris Wilson
919bea6dbb [cairo-gstate] Avoid copying untransformed glyphs.
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.
2007-08-31 16:28:06 +01:00
Behdad Esfahbod
62377cbac1 [cairo-path-fixed] Remove leftover typedef keyword
Oops!
2007-08-30 19:45:44 -04:00
Behdad Esfahbod
dd406b1ffa [cairo-path-fixed] typedef char cairo_path_fixed_op_t
So it consumes one byte only, instead of the previous enum with
the __attribute__((packed)) that didn't do anything on non-gcc systems.
2007-08-30 18:45:47 -04:00
Carl Worth
e7324454a0 Disable radial-gradient and unbounded-operator tests for pdf
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.
2007-08-29 15:26:41 -07:00
Adrian Johnson
f72078fb76 Fix unbounded operator bug in analysis surface 2007-08-29 14:58:48 -07:00
Adrian Johnson
3216275fd9 Fix PDF gradients bug
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.
2007-08-29 14:58:36 -07:00
Vladimir Vukicevic
bdc70d1fc2 [win32] call scaled_font_fini in create before returning NULL 2007-08-29 12:52:00 -07:00
Behdad Esfahbod
114b07881e [configure.in] Make PS backend require zlib too (#12210)
The PS backend uses zlib these days.  Make it depend on zlib being available
like PDF has been doing.
2007-08-29 12:19:05 -04:00
Behdad Esfahbod
7f726e5754 [configure.in] Document version scheme 2007-08-29 12:19:05 -04:00
Vladimir Vukicevic
93aee43690 Fix previous create_similar fallback patch
We can't use composite, as some backends don't implement it.
Use paint() instead.
2007-08-28 16:47:24 -07:00
Vladimir Vukicevic
6525d4debb [win32] call free() and not scaled_font_destroy() if scaled init fails
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).
2007-08-28 10:54:20 -07:00
Vladimir Vukicevic
ae19b1c991 [win32] Add cairo_win32_font_face_create_for_logfontw_hfont
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.
2007-08-28 10:54:20 -07:00
Vladimir Vukicevic
69dae7ee4a Implement fallback for clone_similar 2007-08-28 10:54:19 -07:00
Vladimir Vukicevic
19fa097f51 [win32] Update win32 Makefiles
Happy building with msys, one location for CFLAGS/etc changes (toplevel),
new pdiff makefile.
2007-08-28 10:54:18 -07:00
Vladimir Vukicevic
f4a8633fce [win32] check correct surface for BitBlt support in get_subimage 2007-08-28 10:54:18 -07:00
Vladimir Vukicevic
9aad6efd2b Fix image_extra arg in call to _cairo_release_source_image 2007-08-28 10:54:17 -07:00
Behdad Esfahbod
7ccae2de6d [perf] Make cairo-perf-diff build cairo-perf-diff-files 2007-08-28 13:46:28 -04:00
Adrian Johnson
766346aa5c PDF: Remove unused code 2007-08-28 20:35:49 +09:30
Adrian Johnson
ad43b7fe6b PDF: Clean up comments 2007-08-28 20:35:23 +09:30
Adrian Johnson
a60beb2eef Fix PDF regression with multipage documents 2007-08-28 20:34:55 +09:30
Carl Worth
1a6b62e599 Disable 7 cairo-pdf tests due to poppler knockout-group bug
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.
2007-08-27 14:45:51 -07:00
Adrian Johnson
1cdd11873b Add finer-grained fallback support to the PDF surface
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.
2007-08-27 14:21:36 -07:00
Carl Worth
1e8446609b Add explanation of pdf_ignored_tests with links to upstream poppler bug reports 2007-08-27 14:02:55 -07:00
Carl Worth
463493af73 Remove svg2pdf and pdf2svg programs from test directory
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.)
2007-08-27 10:40:06 -07:00
Carl Worth
495c9d19bf One more PS-specific reference image (for over-between-source)
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
2007-08-25 23:39:28 -07:00
Carl Worth
a3c3fe2296 Modify ps-specific reference images for ft-text-vertical tests
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).
2007-08-25 19:24:07 -07:00