Commit graph

1016 commits

Author SHA1 Message Date
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
Azar@.(none)
4c005f7ce3 replaced round with _cairo_lround. Round doesn't compile on Win32 2008-02-06 00:27:57 -05:00
Vladimir Vukicevic
7b788ce7ca Update test ref images that changed with stroking changes 2008-02-05 15:04:38 -08:00
Vladimir Vukicevic
03256d0f2b Remove get-xrender-format from list of tests to be run on all platforms 2008-02-05 15:04:11 -08:00
Adrian Johnson
6140776b4e Update operator-source ps ref images 2008-02-05 00:22:26 +10:30
Adrian Johnson
dee6e27537 Add dash-curve ps ref image 2008-02-05 00:12:48 +10:30
Adrian Johnson
381fcf01d7 Update over-around-source ps ref image 2008-02-03 20:05:41 +10:30
Adrian Johnson
9dda017af9 Update gradient-alpha ps ref images 2008-02-03 19:53:35 +10:30
Adrian Johnson
3f943a98f6 Add linear-gradient-reflect ps ref image 2008-02-03 19:49:23 +10:30
Adrian Johnson
7c5bc5fde8 Add operator-clear ps ref image 2008-02-03 18:58:02 +10:30
Adrian Johnson
06b2d009ba Update clip-operator ps ref image 2008-02-03 18:50:14 +10:30
Adrian Johnson
92a2e851df Update operator-source PS ref images 2008-02-02 23:00:30 +10:30
Carl Worth
4ccb8cb295 Add some more reference images to REFERENCE_IMAGES 2008-01-30 05:16:26 -08:00
Carl Worth
ca10920cc9 Add a1-image-sample and a1-traps-sample reference images to the dist list 2008-01-30 05:07:20 -08:00
Carl Worth
d49b1220b2 Remove extend-pad-similar test case
This seems redundant with the recent testing of all test cases
against similar surfaces. Plus, it hasn't had a reference image
anyway which was causing problems with the recent extra checks
for missing reference images.
2008-01-30 04:52:50 -08:00
Carl Worth
fa6aedf2d6 Fix typo in printf arguments in error message 2008-01-29 09:01:47 -08:00
Adrian Johnson
41a5700793 Fix undefined macro that was preventing the tests from compiling 2008-01-29 20:27:06 +11:00
Carl Worth
247e101199 Fix bitmap-font test by using near-equality for double comparison 2008-01-28 21:26:05 -08:00
Carl Worth
7c00269e00 Add pdf-specific reference images for meta-surface-pattern
This test has been "failing" ever since we had native
replay of metasurfaces to pdf. But looking at the results,
they are actually superior to the image-backend reference
images.
2008-01-28 15:39:40 -08:00
Carl Worth
9cd198d200 Test the no-Render-extension-available case in get-xrender-format 2008-01-28 15:39:40 -08:00
Carl Worth
d7fd3bd536 Add get-xrender-format test to test cairo_xlib_surface_get_xrender_format 2008-01-28 15:39:40 -08:00
Carl Worth
13a5624277 Rename cairo_image_surface_stride_for_width to cairo_format_stride_for_width
Thanks for Behdad for the suggested name improvement. Also, make
it more clear that the stride passed to cairo_image_surface_create_for_data
should come from calling cairo_format_stride_for_width with the
same width.
2008-01-28 15:39:39 -08:00
Carl Worth
dc67de3d8b Add cairo_image_surface_stride_for_width
Document this function as a required call to get the correct
stride value before calling cairo_image_surface_create_for_data.
This means that previously-failing calls with non-multiple-of-4
stride values are now documented as errors. Also, we now have
the possibility of moving to more stringent alignment constraints,
(one can imagine doing 64-bit or 128-bit boundaries for example).
2008-01-28 15:39:36 -08:00
Behdad Esfahbod
b18bc660c6 [test/font-matrix-translation] Fix function signature 2008-01-28 02:33:58 -05:00
Behdad Esfahbod
bae496df11 [test/bitmap-font] Test under all combinations of hinting, test font metrics too
This is now failing as we compute NAN font metrics for bitmap-only fonts under
disabled metrics hinting.  A very infamous bug excercised with PangoCairo's PDF
output.
2008-01-25 08:03:32 -05:00
Behdad Esfahbod
20c8531243 [test/text-zero-len] Test text and font extents for font size 0 2008-01-25 07:14:07 -05:00
Behdad Esfahbod
83bd590760 [test] Test that cairo_text_extents() and cairo_scaled_font_text_extents() match
in results.
2008-01-25 07:02:25 -05:00
Behdad Esfahbod
2182384277 [test] Minor fix for check-ref-dups rule 2008-01-23 15:07:26 -05:00
Behdad Esfahbod
e7c0a69dcb [test] Also check for reference images listed in Makefile.am but missing
in git, and if this is not a git checkout, in source directory.
2008-01-23 14:57:59 -05:00
Bertram Felgenhauer
b6c7236443 update reference images for some non-aa testcases 2008-01-23 18:09:20 +01:00
Behdad Esfahbod
5024650d4d [test] Only summarize check results for the tests tested! 2008-01-22 12:46:03 -05:00
Carl Worth
18181f12ae Make Carl return from his time-traveling expedition 2008-01-22 06:25:19 -08:00
Carl Worth
47cf7ed769 Test and document that fill rule has no effect on cairo_path_extents 2008-01-21 16:45:41 -08:00
Carl Worth
32efcc9462 Add new rectilinear-miter-limit test to demonstrate bug
We're failing to respect the miter limit in the rectilinear
stroke optimization code.
2008-01-21 16:32:48 -08:00
Carl Worth
c480eedbb5 Test and document extents of degenerate "dots"
It's a common idiom to stroke degenerate sub-paths made with
cairo_move_to(x,y);cairo_rel_line_to(0,0) to draw dots. Test
that we get the desired extents from cairo_fill_extents,
cairo_stroke_extents, and cairo_path_extents for these cases.

Also document that the cairo_path_extents result is equivalent
to the limit of stroking with CAIRO_LINE_CAP_ROUND, (so that
these "dot" points are included), as the line width
approaches 0.0 .
2008-01-21 14:56:21 -08:00