Commit graph

1900 commits

Author SHA1 Message Date
Carl Worth
fa4b91fcac Add missing reference images to make distcheck happily 2008-02-28 12:56:31 -08:00
Carl Worth
a95b22858f Merge branch '24.8' 2008-02-28 12:30:13 -08:00
Carl Worth
c84ec58512 Add some missing .gitignore entries 2008-02-27 16:24:10 -08:00
Carl Worth
1df0b001b5 Change cairo's fixed-point format from 16.16 to 24.8
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.
2008-02-27 15:08:18 -08:00
Carl Worth
0532cb5c03 Remove reference images for text-zero-len
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).
2008-02-27 13:18:39 -08:00
Carl Worth
427a73ab31 Add ps-specific reference images for two recently-added tests 2008-02-27 12:43:37 -08:00
Carl Worth
676c869d79 Add some new ps-specific reference images
These are necessary now due to the recent change to use pdiff
only when the differences are less than a particular threshold.
2008-02-27 11:24:59 -08:00
Chris Wilson
65a8a27943 [test] Add reflected-stroke to exercise stroking with a reflected ctm.
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.
2008-02-26 17:06:18 +00:00
Chris Wilson
76f0613e5f [test] Add long-dashed-lines to exercise _cairo_box_intersects_line_segment().
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.
2008-02-26 17:05:28 +00:00
Vladimir Vukicevic
9979f786ac [test] update degenerate-pen test
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.
2008-02-25 21:27:33 -05:00
Vladimir Vukicevic
baec928a69 [quartz] More mask fixes -- handle all types via fallback mask image 2008-02-25 21:06:36 -05:00
Vladimir Vukicevic
3fcd0be522 Use pdiff only if the pixel difference is less than a limit 2008-02-25 21:06:35 -05:00
Vladimir Vukicevic
1dfb1bd45f [quartz] update test suite images for quartz 2008-02-25 21:06:28 -05:00
Behdad Esfahbod
ecb54b9696 [test/get-path-extents] Don't use short-circuit && operators
That causes some tests to be skipped if the preceding test failed.
2008-02-25 19:48:58 -05:00
Behdad Esfahbod
be316b7cfa [test]/get-path-extents] Use %g instead of %f to print doubles 2008-02-25 19:36:44 -05:00
Adrian Johnson
35295546ef Add mask pdf ref images
The mask test pdf output is now correct. Poppler ref images
are required due to minor gradient rendering differences.
2008-02-22 22:06:25 +10:30
Adrian Johnson
1df969158c Refresh clip-operator ps/pdf ref images
Because the meta surface analysis fix increased the size of some of
the fallback images.
2008-02-22 21:59:47 +10:30
Carl Worth
dcab5019d5 Add poppler-specific reference image for radial-gradient
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
2008-02-20 17:35:48 -08:00
Carl Worth
0f2ecb5ec6 Update REFERENCE_IMAGES for distcheck 2008-02-20 08:24:32 -08:00
Carl Worth
f954db72dd Add svg-specific reference image for mask-alpha
There's no apparent bug here.
2008-02-20 06:24:48 -08:00
Carl Worth
c197c684a6 Update ps-specific reference images for ghostscript 8.61
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.
2008-02-20 05:58:42 -08:00
Carl Worth
8d2d413014 Expand the documentation of cairo/test/README
Add notes on CAIRO_REF_DIR and the version requirements of
poppler and ghostscript necessary for getting no failures.
2008-02-20 05:11:53 -08:00
Carl Worth
4d42f56900 Update ps-specific 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.
2008-02-20 04:22:58 -08:00
Carl Worth
78b270601c Add poppler-specific reference image for source-clip-scale
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.
2008-02-20 04:04:05 -08:00
Carl Worth
64b7489a50 Add poppler-specific reference image for push-group
This is justified by the following new bug report:

	Incorrect clipping of group object (regression?)
	https://bugs.freedesktop.org/show_bug.cgi?id=14580
2008-02-20 04:04:05 -08:00
Carl Worth
7aaa3e67c5 Add poppler-specific reference images for tests needing EXTEND_PAD
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
2008-02-20 04:04:05 -08:00
Carl Worth
fdd046edcc Add poppler-specific reference image for text-pattern
This is justified with the following new bug report:

	Poppler renders patterned text as black
	https://bugs.freedesktop.org/show_bug.cgi?id=14577
2008-02-20 04:04:04 -08:00
Carl Worth
43302f0408 Re-enable pdf tests with gradients and add poppler-based reference images
This freezes the current (buggy) poppler result in the test suite
so that we will notice any future regressions.
2008-02-20 04:04:04 -08:00
Carl Worth
635fed7767 Re-enable some pdf tests now that poppler has knockout support
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).
2008-02-20 04:04:04 -08:00
Carl Worth
e7c6e291a6 Add svg-specific reference images for meta-surface-pattern test 2008-02-20 04:04:04 -08:00
Carl Worth
1747718406 Add a spline to the degenerate-pen test case
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.
2008-02-20 04:04:04 -08:00
Shailendra Jain
536e1963b7 Compile fix for AIX.
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.)
2008-02-15 13:50:43 +00:00
Chris Wilson
9e9fda0478 [test/bitmap-font] Destroy the font options after use.
Fix the leak of the font options.
2008-02-15 13:50:43 +00:00
Chris Wilson
92970ec836 [test/invalid-matrix] Test detection of infinities.
Feed infinities into the API and check that we correctly return
INVALID_MATRIX.
2008-02-15 13:50:43 +00:00
Chris Wilson
012f68e043 [test/invalid-matrix] Check scale(0,0)
Test that INVALID_MATRIX is returned if the user calls cairo_scale(0,0)
or a variant thereof.
2008-02-15 13:50:43 +00:00
Chris Wilson
eb7488e1e6 [test/invalid-matrix] Promote incorrect status warning to an error.
As the last warning for an incorrect status has been resolved, throw an
error if we regress and no longer report an INVALID_MATRIX under testing.
2008-02-15 13:50:43 +00:00
Chris Wilson
fc732c3aaa [cairo-scaled-font] Create error objects on demand.
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.
2008-02-15 13:50:42 +00:00
Chris Wilson
ad265cc9f2 [cairo-font-options] Disallow use of NULL font-options.
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.
2008-02-15 13:50:42 +00:00
Chris Wilson
fe93038ef3 [test/font-options] Check for HAVE_FCFINI
Only pull in the fontconfig headers if we actually use FcFini().
2008-02-15 13:50:42 +00:00
Chris Wilson
4430157841 [test] Summarise the tests failures per backend.
After the summary, show the total number of failures per backend.
2008-02-15 13:50:42 +00:00
Chris Wilson
af88d4d9ae [test/a8-mask] Fix memleak.
Destroy the auxiallary surfaces and contexts.
2008-02-15 13:50:42 +00:00
Chris Wilson
a4c960a93c [test] Add tests using each backend as a source.
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.
2008-02-15 13:50:41 +00:00
Chris Wilson
53c1ed25ab [test/a1-sample-image] Fix the memleak.
Destroy the surface after use.
2008-02-15 13:50:41 +00:00
Chris Wilson
d7ce0582f1 [test/font-options] Check the defaults values.
Exercise the getters by checking that a fresh cairo_font_options_t has
the default values.
2008-02-15 13:50:41 +00:00
Chris Wilson
f40f24e272 [test/invalid] Test cairo_translate() and friends for NaN safety.
Pass NaNs to cairo_translate() and friends and check that they raise
an INVALID_MATRIX error.
2008-02-15 13:50:41 +00:00
Adrian Johnson
fbde0fb872 Update PS ref images 2008-02-15 08:17:25 +10:30
Adrian Johnson
2324a48c95 Update rotate-image-surface-paint ps ref image 2008-02-15 07:42:29 +10:30
Antoine Azar
5e9cdcca00 Fixed rounding function call 2008-02-08 00:19:57 -05:00
Azar@.(none)
95db215cc1 Some fixes and improvements to the Win32 build 2008-02-06 21:45:24 -05:00
Carl Worth
7800cfd7de Add several Makefile.win32 files to EXTRA_DIST
Otherwise, these files were being omitted from the tar files.
2008-02-06 17:01:22 -08:00