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
Carl Worth
55e0dddf04
Add cairo_path_extents testing to several cases missing it
...
With these degenerate shapes, cairo_path_extents still returns
a zero-area rectangle, but with a non-zero offset.
2008-01-21 14:45:06 -08:00
Carl Worth
c15cab8b68
Correct near-pangram to be an actual pangram
...
This wasn't affecting the test quality at all, but it did annoy
me to see this mistake.
2008-01-21 13:34:53 -08:00
Carl Worth
ed695bdb9b
Define repeated string literal once
2008-01-21 13:33:46 -08:00
Brian Ewins
4177208be6
[cairo] Add cairo_path_extents()
...
This new function gets the extents of the current path, whether
or not they would be inked by a 'fill'. It differs from
cairo_fill_extents() when the area enclosed by the path is 0.
Includes documentation and updated test.
2008-01-21 12:04:32 -08:00
Carl Worth
50d0767c8b
Add a1-image-sample and a1-traps-sample tests
...
Both of these currently fail due to bugs in the way pixman does
its sampling.
2008-01-18 12:41:57 -08:00
Chris Wilson
0086db893c
[cairo-font-options] Treat NULL as a default cairo_font_options_t
...
Interpret a NULL cairo_font_options_t as the default values - i.e
as if it were a fresh pointer returned by cairo_font_options_create().
2008-01-17 22:38:02 +00:00
Chris Wilson
630536f176
[test/extend-*] Add various cairo_pattern_set_extend() test cases.
...
Add various test cases to exercise
_cairo_pattern_acquire_surface_for_surface(), most notably using similar
source surfaces to provide coverage of the non-image surface branch.
2008-01-17 17:45:17 +00:00
Chris Wilson
7b1a0eddac
[test/get-path-extents] Exercise cairo_scaled_font_text_extents()
...
Compare cairo_scaled_font_text_extents() to cairo_text_extents() in
order to provide test coverage of cairo_scaled_font_text_extents().
2008-01-17 13:51:21 +00:00
Chris Wilson
aec7ae67aa
[test/text-zero-len] Test the public cairo_scaled_font_* with NULLs.
...
Pass NULL to cairo_scaled_font_(text|glyph)_extents() to test the
consistency of the extents API.
2008-01-17 13:32:04 +00:00
Chris Wilson
390e22894b
[test/in-fill-trapezoid] Add a few holes.
...
Complete the coverage of _cairo_trap_contains() by cutting holes out of
the simple shapes.
2008-01-17 13:13:40 +00:00
Chris Wilson
da9c43329a
[test/in-fill-trapezoid] Add test to exercise _cairo_trap_contains().
...
A simple test to provide coverage of _cairo_trap_contains(), though
not yet seeking boundary conditions.
2008-01-17 11:50:51 +00:00
Chris Wilson
dd13a00541
[test/get-path-extents] Check extents of degenerate paths.
...
Ensure that degenerate paths have zero extents.
2008-01-17 11:50:32 +00:00
Chris Wilson
9ebfa8b5fb
[Makefile.am] Couple check-ref-missing into release-check
...
Verify that all the reference images checked into git will be included
within the distribution tarball as early as possible in the release
process.
2008-01-16 23:30:15 +00:00
Chris Wilson
2621a323a0
[test/dash-curve] Add a new test case for dashes along splines.
...
Modify the dash-state test case and use curves instead of lines -
exercises _cairo_stroker_curve_to_dashed() and degenerate splines.
2008-01-16 23:24:41 +00:00
Carl Worth
5c3a0b5c00
Add miter-precision-ref.png tothe distribution.
2008-01-16 10:22:44 -08:00
Carl Worth
e49db8ed3e
Fix create-for-stream test to log its failure properly
...
Without this, a failure of this test won't be nicely reported
in the post-make-check summary. (Also fix a silly little typo
in the svg-clip test.)
2008-01-16 08:16:06 -08:00
Chris Wilson
968eaf3c44
[cairo-xlib] Fixup --disable-xlib-xrender
...
Fixup the headers and boilerplate to compile and run correctly when
configured with --disable-xlib-xrender.
2008-01-15 13:08:53 +00:00
Chris Wilson
a5e5c1b5b0
[test] Add a custom hook to summarise the failures.
...
Add a check-local hook that scans the log fails and displays a list
of failed tests (and the failing targets).
2008-01-13 15:00:58 +00:00
Chris Wilson
973d5fa8a5
[test] Sort TESTS
...
A couple of tests were out of order, causing a bit of confusion in the
user.
2008-01-12 11:04:03 +00:00
Chris Wilson
ac98c9e572
[test/rel-path] Check that invalid relative paths raise an error.
...
Check that NO_CURRENT_PATH is raised if a relative path op is used
on a new path.
2008-01-12 10:49:48 +00:00
Chris Wilson
864dab828b
[test/text-zero-len] Test passing NULLs to the API.
...
Check that the public API handles NULL - at the moment the code
is a little inconsistent and crashes!
2008-01-12 10:28:16 +00:00
Chris Wilson
6418a8be87
[test/.valgrind-suppressions] Update for amd64/sid
...
Update the valgrind suppressions for the libz and Xrm spam.
2008-01-10 22:14:31 +00:00
Chris Wilson
cbe8d3855e
[test] Fixup make check for mingw
...
Add EXEEXT to TESTS so that mingw builds the correct target.
2008-01-10 17:10:12 +00:00
Chris Wilson
9ae4b219e1
[test/solid-pattern-cache-stress] Check for drand48().
...
Apply an alternative rand() function if drand48() is not available for
the platform.
2008-01-10 14:47:16 +00:00
Keith Packard
81e029edda
Add new miter-precision test. Checks miter joins at many scales.
...
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.
2008-01-03 18:24:24 -08:00
Chris Wilson
c67d99787c
[test/surface-pattern-big-scaled-down] Kill the surface leaks.
...
Destroy the surface and pattern after use.
2008-01-03 18:01:43 +00:00
Chris Wilson
6a7a07adf9
[test] Update distribution list of ref images.
...
Add missing *-ps-rgb24-ref.png images, and a couple of tests to .gitignore.
2008-01-03 17:35:06 +00:00
Chris Wilson
146484e312
[valgrind] Update zlib suppressions.
...
Match the zlib library as found on hardy+dbgsym.
2007-12-20 21:21:54 +00:00
Chris Wilson
3bf06c3366
[test/*] Create new surfaces using the group target.
...
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).
2007-12-20 21:21:32 +00:00
Chris Wilson
14454e12d8
[cairo-test] Wrap test function with cairo_save/restore().
...
Restore the context to the original state before blitting the
group surface in order to remove any residual state such as a clip path.
2007-12-20 17:51:56 +00:00
Chris Wilson
281b11aef1
[cairo-test] Use CAIRO_OPERATOR_SOURCE when painting the group surface.
...
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...
2007-12-20 17:12:08 +00:00
Chris Wilson
ed3fccec01
[pdiff] Avoid the memleak for small surfaces.
...
Allocate the arrays after the guard against small surfaces to avoid
leaking them.
2007-12-20 14:13:12 +00:00
Brian Ewins
b81c8473bd
[test] add test for gradient with no stops
...
Boris Zbarsky reported a bug where having zero stops in a
gradient pattern would crash in the quartz surface. This
test checks for that case. Mozilla bug#407104.
This also crashes testing pdf; and the ps, svg surfaces
look suspicious (they reference stops[0]) but I havent
been able to test them yet.
2007-12-06 21:31:10 +00:00
Vladimir Vukicevic
2c25033e14
[quartz] Handle creating 0x0 surfaces
...
Make all 0x0 surfaces be no-ops when used in a rendering operation.
2007-12-04 13:50:49 -08:00
Emmanuel Pacaud
3554c31e3d
[SVG] Add missing image to REFERENCE_IMAGES list.
2007-11-10 10:43:43 +01:00
Emmanuel Pacaud
8edc3ed485
Merge branch 'master' of git+ssh://emmanuel@git.cairographics.org/git/cairo
2007-11-10 10:10:50 +01:00