Commit graph

2310 commits

Author SHA1 Message Date
Emmanuel Pacaud
9c05d2aab1 fix filename.
shh!
2006-02-02 12:47:58 +00:00
Christian Biesinger
bfc2b49ad9 Updating BeOS reference images, the tests use a black background now. 2006-01-21 11:54:17 +00:00
Christian Biesinger
9fe4934635 Update BeOS test code per the cairo_format_t -> cairo_content_t changes. 2006-01-21 09:46:13 +00:00
Christian Biesinger
2afe78c0c2 Don't mix declarations and code. This makes the code valid ISO C, fixes a gcc -pedantic warning, and unbreaks the build with the compiler Zeta ships with. 2006-01-21 09:39:10 +00:00
Carl Worth
a6ad853ee1 Fix test to use fontconfig properly so that the test no longer fails. Fixes bug #4674. (Thnks to sunmoon1997 for the fix). 2006-01-20 15:15:40 +00:00
Carl Worth
074f886c00 Rip the cairo_content_t argument out of ps/pdf_surface_create as per discussion on cairo mailing list. Instead these surface will behave as if CONTENT_COLOR_ALPHA had been passed (that is, compositing operators will behave as if destination alpha were available).
This also has the benefit of preserving the API that has been in place for PS/PDF surface since the (experimental) stuff in 1.0.0.
Track API change.
Continue testing PS/PDF surfaces in the CAIRO_CONTENT_COLOR mode but do it by rendering to an intermediate similar surface rather than constructing the target surface differently.
2006-01-19 17:48:22 +00:00
Emmanuel Pacaud
14acc7f132 add missing header. Fix #5544. 2006-01-19 12:44:00 +00:00
Carl Worth
c634e54775 Change documentation to recommend cairo_paint rather than cairo_rectangle;cairo_fill for clearing a surface.
Add documentation. Add a cairo_content_t argument to PDF surface constructors.
Add documentation. Add a cairo_content_t argument to PS surface constructors.
Track changes in PS/PDF surface constructor API.
2006-01-18 16:40:17 +00:00
Carl Worth
b5c5fb613d Big change to the test infrastructure and supporting internals. The goal now is to test both a COLOR_ALPHA and a COLOR content for each surface backend, (since the semantics are different and we probably need to support both in each backend.
The PS/PDF backends don't allow a content to be passed in right now, so they fail against the rgb24 tests, but the trivial addition to the constructors will allow them to pass all tests with both content values.
And new constructors (currently internal only) to create an image surface with a cairo_content_t rather than a cairo_format_t.
Add a cairo_content_t argument to the constructor.
Add a cairo_content_t to the constructor and use this content value when constructing intermediate image surfaces in acquire_source, show_page, copy_page, and snapshot.
Add image flattening by compositing over white, as is done in cairo-ps-surface.c.
Track changes to cairo-paginates-surface which now requires a cairo_content_t value (no change to public PS/PDF constructors yet).
Track change in meta-surface and paginated-surface interfaces by now accepting a cairo_content_t rather than a cairo_format_t.
Ignore new output files (argb32 from pdf and ps as well as rgb24 from test-fallback, test-meta, and test-paginated).
Add new utility for flattening PNG images in order to generate the -argbf-ref.png images.
Add image_diff_flattened for comparing flattened output from PS and PDF backend with ARGB reference images by first blending the reference images over white.
Get rid of conditional, format-specific background-color initialization before running tests. Now uses ARGB(0,0,0,0) in all cases. Switch from specifying tests with a format value to specifying tests with a content value. Add support for a 'fake' COLOR_ALPHA_FLATTENED content for testing the PS and PDF output against a flattened version of the argb32 reference images (first blended over white).
Track change in cairo_ps_surface_create (now requires cairo_content_t value).
Adjust tests that draw in default (black) to first paint white so that the results are visible.
Adjust ARGB32 reference images for new white background for changed tests.
Adjust RGB24 reference images for new black background due to changed initialization (and the tests themselves being unchanged).
2006-01-17 16:59:08 +00:00
Christian Biesinger
0b48d620f1 Update BeOS reference images per the recent gradient changes 2006-01-15 04:44:45 +00:00
Christian Biesinger
c79cda6150 Ignore glitz-glx test output 2006-01-14 06:53:43 +00:00
Carl Worth
4e4b38e759 Add a call to cairo_copy_page, so that that gets called at least once within the test suite.
Fix broken implementation of copy_page in the paginated surface by hiding it from the target surface which sees only show_page operations. (It's hard to do better than that unless we can guarantee thathe subsequent page won't trigger any image fallbacks.)
2006-01-12 16:47:05 +00:00
Carl Worth
25882cd5e9 Add a new CAIRO_HAS_MULTI_PAGE_SURFACES automake conditional.
Remove backend-specific tests (ps-surface, pdf-surface, and pdf-clip) that are now redundant with the ps and pdf support in the rest of the test suite.
Add a new one-off test for testing show_page with both the ps and pdf backends.
2006-01-12 16:35:12 +00:00
Carl Worth
3647ff95f9 Some fixes for the fact that multi-page output was totally broken for cairo_ps_surface_t (at least):
Move the Y-axis-flipping to be on a per-page basis (as it was before and as it must be). Put page number back in, (still missing th number of pages from the header).
Add multi-page output for better testing.
2006-01-12 13:36:36 +00:00
Carl Worth
d6cb82c372 Add printf format attribute to cairo_test_log. 2006-01-09 17:18:12 +00:00
Carl Worth
9737b4de39 2005-10-10 David Reveman <davidr@novell.com>
Throw away old gradient code from within cairo-pattern.c in favor of using new support in pixman for gradients.
Update reference images for all tests involving gradients since the gradient output has changed slightly.
2006-01-04 17:59:03 +00:00
Vladimir Vukicevic
c6cdfc5770 Clamp surface dimensions to a minimum of 1. (_cairo_glitz_surface_get_image): Set the glitz clip to NULL before calling glitz_get_pixels, to return the full surface contents. Restore clip afterwards. (_cairo_glitz_surface_composite_trapezoid): Return UNSUPPORTED if the antialias is anything other than DEFAULT/GRAY.
Try to recover a standard cairo_format_t from given pixman format masks, so that various things that only work with a standard format work correctly.
Remove cairo_glitz_surface_write_to_png, replace with generic cairo_surface_write_to_png (since it works with image-surface create_with_masks fix)
2006-01-03 09:23:48 +00:00
Vladimir Vukicevic
bd265e008b Clean up output some; show only images that fail, otherwise just show pass/fail squares. 2006-01-03 07:29:57 +00:00
Michael Emmel
23e5e55841 New directfb backend for cairo includes test suite and example to run the test is in the comment at the top of cairo-test-directfb.c enable with
--enable-directfb
2005-12-29 07:17:01 +00:00
Christian Biesinger
78d892d70e Add BeOS-specific reference images for tests where the maximum color difference is 1. 2005-12-27 09:47:58 +00:00
Christian Biesinger
4fe93bcf92 Don't require that the caller locks the view; do it in cairo code.
Remove the now-unneeded locking
2005-12-26 16:44:41 +00:00
Carl Worth
e71e2fc4f1 Add a private cairo_paginated_surface_t which builds on top of the meta surface and is intended to provide an easy interface with common functionality for the various paginated surface types (ps, pdf, etc.).
Add test_paginated_surface_t which is another test surface enabled with --enable-test-surfaces. The test_meta_surface code served as the basis for cairo_paginated_surface_t so that test surface may be entirely superfluous now.
2005-12-21 16:46:44 +00:00
Carl Worth
5280c09b7d Fix indentation. 2005-12-21 12:08:57 +00:00
Carl Worth
75b2fe93f0 Use _cairo_surface_paint rather than _cairo_surface_fill_rectangle as only the former is guaranteed to work with all backends.
Refine the comment describing this test surface.
Add new test surface for exercising cairo_meta_surface.
Simplify the image and test_fallback targets by not using create_for_data. Allow for NULL cleanup target functions. Add support for the test_meta_surface.
2005-12-19 22:01:39 +00:00
Emmanuel Pacaud
ffe10b7c87 Shhhh... 2005-12-19 14:18:06 +00:00
Emmanuel Pacaud
ec574cd6f0 CAIRO_CAN_TEST_SVG_SURFACE depends on librsvg.
cairo_svg_surface_t owns a xml node, for support of svg_surface_composite. (_cairo_svg_surface_create_for_document): init xml_node. All surfaces except first one are stored in defs node. (emit_composite_image_pattern): returns pattern size, and don't call emit_transform if is_pattern == TRUE. (emit_composite_svg_pattern): do something. (emit_composite_pattern): returns pattern size. (_cairo_svg_surface_composite): xml_node is stored in cairo_svg_surface_t now. (emit_surface_pattern): emit surface pattern width here. Fix property names. (_cairo_svg_path_close_path): don't close path if no current point. (_cairo_svg_surface_fill_rectangles): new. (_cairo_svg_surface_fill): emit fill rule. xml_node is in surface now. (_cairo_svg_surface_composite_trapezoids): xml_node is in surface now. (_cairo_svg_surface_stroke): ditto. (_cairo_svg_surface_intersect_clip_path): ditto. Emit fill rule.
ignore svg2png.
build svg2png utility.
test SVG backend if CAIRO_HAS_SVG_SURFACE && CAIRO_CAN_TEST_SVG_SURFACE.
new.
2005-12-19 13:59:34 +00:00
Christian Biesinger
6142bc5348 Mention new --enable-svg option
Add notes for the new BeOS backend
Add disabled by default BeOS backend
Add BeOS files
New
New
BEOS_SURFACE_FEATURE
BeOS mutex functions
Ignore files generates by the BeOS tests
Add cairo-test-beos.*
New.
Test BeOS backend.
2005-12-18 17:20:06 +00:00
Carl Worth
c75232f8ab Add a new option --enable-test-surfaces.
New surface backend for testing only. It has as many NULL backend entries as possible.
Add support to test the new test_fallback backend.
2005-12-16 11:31:10 +00:00
Christian Biesinger
6ba7772138 Globally rename "operator" to "op", to allow writing backends in C++
reviewed by: cworth
2005-12-16 03:02:35 +00:00
Stuart Parmenter
88615148ca #define access _access and #define F_OK to 0 on for MSVC
add CAIRO_BEGIN_DECLS and CAIRO_END_DECLS
2005-12-14 19:56:09 +00:00
Carl Worth
77540a2dfa Add preliminary support for --enable-gcov. Thanks to Pierre-Alain Joye (with inspiration from the PHP gcov support by Jani Taskinen and Ilia Alshanetsky).
Ignore *.gcda and *.gcno gcov data files.
2005-12-14 16:22:06 +00:00
Vladimir Vukicevic
c2c4f0bb25 bump glitz req to 0.5.1, test for backends
Add glitz backend (original patches from sunmoon1997@gmail.com), including glx, wgl, and agl support. Add CAIRO_TEST_TARGET environment variable for limiting backends to test.
Takes all *.log files and spits out html to stdout that can be used to view all test results at once.
2005-12-12 11:56:40 +00:00
Emmanuel Pacaud
840f93698d shhh... 2005-12-08 13:22:09 +00:00
Emmanuel Pacaud
b2f973e7f4 add optionnal disabled by default SVG backend.
include SVG backend files.
include SVG_SURFACE_FEATURE.
rename dtostr to _cairo_dtostr for use in cairo-svg-surface.c.
_cairo_dtostr declaration.
new.
new.
build svg-surface and svg-clip.
new.
new.
2005-12-08 13:09:26 +00:00
Carl Worth
45c350e328 Add checks for poppler and friends which are needed by pdf2png. Set CAIRO_CAN_TEST_PDF_SURFACE as both a #define and an automake conditional.
Build pdf2png if possible.
Add support for testing the PDF backend.
New utility program to convert a PDF file into a PNG image using poppler (thanks to Kristian Høgsberg).
Ignore new stuff generated by PDF backend testing.
2005-12-07 16:06:11 +00:00
Carl Worth
96be55124f Fix to check cairo_surface_status rather than !surface which is always false. (cleanup_ps): Fix leak of filename memory. 2005-12-07 11:53:30 +00:00
Stuart Parmenter
49136c04f2 Hooked up tests to run on Windows with a Windows surface 2005-11-17 11:55:20 +00:00
Carl Worth
5b6c912667 Note that PS is now passing all tests except for self-copy.
Add missing glue to hook up PS backend with new meta-surface support for the 5 basic drawing operations. Currently, this forces image fallbacks for all operations.
Switch from gs device of pngalpha to png16m which for some reason gives the correct result for nil-surface now, while pngalpha does not.
Key off of N_OPERATORS as the loop control for easier trimming down of this test case when debugging.
Rename stroke_style parameter to style in backend->stroke parameter list.
Remove PS-specific reference images for many tests which are now using more fallback paths than before.
2005-11-08 17:43:13 +00:00
Carl Worth
d93767c6ee Add reference images for antialiasing modes which are basically not applicable to the PS output. 2005-10-18 12:04:41 +00:00
Carl Worth
99d02f2adc Add verified image for PS output for dash-offset-negative. 2005-10-13 21:04:28 +00:00
Carl Worth
31a561e2c2 Push fill_path fallbacks down from gstate into the surface where all the other fallbacks are.
Add _cairo_surface_is_meta.
Add antialias to the fill_path meta-surface command.
Add an antialias parameter to the backend fill_path function.
Fix test description.
Reviewed by: keithp
2005-10-13 16:55:14 +00:00
Carl Worth
1fa004f2a6 Add extend-reflect to the 1.2.0 roadmap. Mark dashed splines and clip-all as fixed.
Mark extend-reflect as an expected failure.
2005-10-12 14:23:11 +00:00
Carl Worth
7dcbcdf75c Add a couple of tests to improve our coverage (clipping under both fill rules). 2005-10-12 13:37:00 +00:00
Kristian Høgsberg
f39816e016 Transform source pattern for _cairo_surface_fill_path() also (#4673).
Use cairo_fill_preserve() instead of cairo_save()/cairo_restore().
Add missing return values.
2005-10-10 09:36:39 +00:00
Billy Biggs
b207dfe822 Add a new test to start investigating bug 4183.
The new test.
Ignore the new test.
2005-10-09 14:51:55 +00:00
Carl Worth
951c7a6592 Make surface image data static to work around a bug in cairo-meta-surface.c (not copying source surface pattern data). 2005-10-09 13:33:21 +00:00
Carl Worth
e26dbd9500 Add ps-backend-specific reference images for test for which the current output is fine, but just happens to not be identical to the existing reference images, (ie. just minor differences shape-boundary pixels). 2005-10-08 13:04:18 +00:00
Carl Worth
94dece56a5 Ignore output of PS tests.
Fix the PS tests to work again, (track change in create_surface interface).
2005-10-08 11:58:20 +00:00
Carl Worth
74af57339c Add missing initialization for ximage.xoffset. 2005-10-06 11:32:54 +00:00
Keith Packard
d3e7dad53e Add rgb24 surface tests, support per-target reference images and support PS surface testing
reviewed by: cworth
2005-09-29 14:31:08 +00:00