Commit graph

721 commits

Author SHA1 Message Date
Vladimir Vukicevic
b3e2252b94 Augment test framework to test everything under device offsets as well.
[With this change, two tests with gradients exhibit subtle differences
under device offsets. I don't think we actually care about them
though. -cworth]
2006-05-03 23:42:45 -07:00
Carl Worth
8a174a1139 Add test/pdf-features.c missing from an earlier commit 2006-05-03 13:20:07 -07:00
Carl Worth
7c825797c8 Add pdf2svg utility for manual testing (not used in test suite) 2006-05-03 13:18:40 -07:00
Carl Worth
c35bfffa10 Add new pdf-features test to exercise cairo_pdf_surface_set_size 2006-05-03 12:39:45 -07:00
Carl Worth
5448278d6e ps-features: Minor touchups (missing include, typo in error message) 2006-05-03 12:38:49 -07:00
Carl Worth
6acc836df2 Add backend-specific reference images to EXTRA_DIST so they'll go out in the tar file. 2006-05-03 00:57:28 -07:00
Carl Worth
09dfd6c3c1 PS: Add three new public functions for emitting DSC comments.
This commit adds the following new functions to the cairo-ps API:

	cairo_ps_surface_dsc_comment
	cairo_ps_surface_dsc_begin_setup
	cairo_ps_surface_dsc_begin_page_setup

Many thanks are due to Michael Sweet who provided invaluble guidance
during the design of this API.

It is hoped that with this API in place, basically all printer control
that is likely to be desired to be performed with cairo PostScript
output is now possible.

This commit augments the ps-features test to exercise the new API.
2006-05-03 00:26:22 -07:00
Carl Worth
253472492e pdf2png: Use new poppler_page_render to render directly through cairo.
...as opposed to using poppler_page_render_to_pixbuf.
2006-05-02 16:57:27 -07:00
Emmanuel Pacaud
e7459428dc SVG: Convert SVG file with a resolution of 72 dpi.
That means 1 point = 1 pixel
2006-05-02 23:37:23 +02:00
Carl Worth
8488aaee1a PS: Add cairo_ps_surface_set_size along with ps-features test
Add a new cairo_ps_surface_set_size which can be used to produce a
PostScript file consisting of pages of various different sizes (or
orientations).

Also add a new test (ps-features.c) for testing this and subsequent
ps-specific function calls.
2006-05-02 12:36:35 -07:00
Emmanuel Pacaud
0c927c5388 SVG: Add reference images for tests failing on 1 digit error on color. 2006-05-01 23:23:02 +02:00
Emmanuel Pacaud
0625d4cd3f SVG: Ignore SVG test files. 2006-05-01 22:15:38 +02:00
Emmanuel Pacaud
d1dcbbb8c3 SVG: Update rgb24 reference files.
(cherry picked from 7173951535f4b95da37cbf3d51143deeec95e47a commit)
2006-05-01 22:13:18 +02:00
Emmanuel Pacaud
6a33993b15 Merge branch 'origin' 2006-05-01 22:01:38 +02:00
Emmanuel Pacaud
b920dfd3df SVG: Reenable operator tests, and rgb24 surface are meta-surfaces. 2006-05-01 21:59:53 +02:00
Carl Worth
3aa5d76d23 Add missing file leaky-dash-ref.png 2006-04-29 14:28:21 -07:00
Carl Worth
9729fe6024 Add line-width-scale test to demonstrate cairo_set_line_width bug 2006-04-27 11:45:38 -07:00
Emmanuel Pacaud
5515191f84 Use CLEAR operator in mask.c in order to not trig image fallback
for polygon masking.
(cherry picked from 30b2d1c5df9d1c6b536838a6a3407fdfa7198e29 commit)
2006-04-27 06:50:37 -07:00
Christian Biesinger
9ab4b81a09 Use a single LDADD variable instead of a per-test one
to avoid repeating the list of tests.
2006-04-27 00:51:01 +02:00
Carl Worth
e0a2e1fd14 Add leaky-dash test case demonstrating bug #4863.
Test case for bug #4863:

	stroking problems with wide dashed lines
	https://bugs.freedesktop.org/show_bug.cgi?id=4863
2006-04-26 12:51:54 -07:00
Carl Worth
e4b3cb1e71 Remove deleted reference images from Makefile.am 2006-04-26 12:49:58 -07:00
Carl Worth
7110c168f7 Remove redeundant -rgb24-ref.png images.
In several cases the -rgb24 reference images were identical to the -ref images.
So we change the logic to find the latter if the former doesn't exist, and then
we remove the redundant images.
2006-04-26 12:36:22 -07:00
Carl Worth
d5dd5e6ebc Remove from EXTRA_DIST reference images which don't exist 2006-04-25 09:12:30 -07:00
Carl Worth
a0df6fa696 Update PS and PDF reference images for change in font options 2006-04-25 07:07:48 -07:00
Behdad Esfahbod
f1c3754753 Use white on red for failures. 2006-04-25 09:58:48 -04:00
Behdad Esfahbod
9668b6592f Set background color to red for test failures printing on a terminal. 2006-04-25 09:03:26 -04:00
Carl Worth
bef621e870 Augment tests to do better testing of paths/images with alpha.
Add a new cairo_test_paint_checkered function so that tests that draw
with alpha can easily put an easy-to-see checkered background in place
first.

Add new tests caps-joins-alpha and paint-source-alpha that do simple
tests of strokes and image painting with source pattern alpha.

Also, add the checkered background to paint-with-alpha for
consistency.
2006-04-25 01:56:51 -07:00
Carl Worth
a5afc59d0a Add PDF-specific reference image for scale-source-surface-paint
It only fails because the PDF ouput doesn't preserve the NEAREST filter attribute.
There might be a way to get something like this in the PDF, but it's not the point
of the test.
2006-04-24 16:16:19 -07:00
Carl Worth
a1bba71eb9 Trivial indentation fix 2006-04-24 14:51:31 -07:00
Carl Worth
893239248a Prefer RGB24 over ARGB32 for source surfaces in tests.
Some tests were using source surfaces created as ARGB32 even though all
alpha values are entirely opaque. This meant these tests were triggering
more fallbacks than strictly necessary for what the tests are ttrying to
do.
2006-04-24 14:50:52 -07:00
Christian Biesinger
e0bf137804 Fix create_xcb_surface signature 2006-04-23 21:22:17 +02:00
Carl Worth
810d9d1985 PDF: Fix reference images inadvertently committed as PDF not PNG 2006-04-20 10:54:01 -07:00
Carl Worth
c5d5687ac0 PDF: Add simple implementation of _cairo_pdf_surface_show_glyphs (text as paths).
This isn't very exciting text output---it simply turns every call to
cairo_show_glyphs into a single filled path. But at the very least,
text will no longer trigger image fallbacks for the PDF backend.

With this commit, the following tests change from all-fallback to
all-native for the PDF backend:

	show-text-current-point
	text-antialias-gray
	text-antialias-none
	text-antialias-subpixel
	text-cache-crash
	text-rotate

There are rasterization differences in the output (cairo vs. freetype)
so this commit also adds new PDF-specific reference images for some of
those tests so that the suite continues to report PASS.
2006-04-19 11:07:19 -07:00
Carl Worth
eadb26a1c1 Add new PS-specific reference image for new-sub-path. 2006-04-18 15:19:36 -07:00
Carl Worth
448e904b2a Merge branch 'cairo' into new-sub-path
Conflicts:

	src/cairo-path-stroke.c
	src/cairo-pdf-surface.c
	src/cairo-ps-surface.c
2006-04-18 15:18:31 -07:00
Emmanuel Pacaud
ffab2592fc Clear completely the temporary surface between each subtest in mask.c
That helps SVG backend to pass this test, since CAIRO_OPERATOR_CLEAR on a part of a surface use "comp-op" element which is not supported with current librsvg.
2006-04-18 21:52:06 +02:00
Emmanuel Pacaud
36fb36fe8c SVG: Add validating ref file for unantialias tests.
Antialias property is not directly supported by SVG, and probably not the most wanted feature. In the future, we could use an image fallback in order to emulate it, or try to use text-rendering, shape-rendering and image-rendering
properties (http://www.w3.org/TR/SVG/painting.html#RenderingProperties).
2006-04-18 21:22:58 +02:00
Emmanuel Pacaud
62d2f7cbf3 SVG: Return UNTESTED for test involving operators.
unbounded-operator, operator-clear, operator-source, clip-operator
2006-04-17 09:54:03 +02:00
Emmanuel Pacaud
347083b3f0 SVG: Add reference files for antialiased text tests.
Currently, text are rendered as paths in SVG files, so, when rendered to png through librsvg, they don't match general reference images.
2006-04-16 16:00:27 +02:00
Emmanuel Pacaud
714bb88832 SVG: Add support for CAIRO_CONTENT_COLOR in create_similar.
Also add support for testing this feature in test/cairo-test.c
And a bunch of unwanted commit of sgml files.
2006-04-16 15:42:49 +02:00
Carl Worth
e890bfd2bf Ignore dash-zero-length 2006-04-14 17:26:23 -07:00
Emmanuel Pacaud
e952e0aff8 SVG: Add documentation for public API. Fix test filenames and add testing of CAIRO_CONTENT_COLOR 2006-04-14 22:53:58 +02:00
Carl Worth
c81569d2f1 Flesh test-paginated-surface out into a complete surface.
This adds an aactual test_paginated_surface_backend rather than just
having this test surface create a paginated surface around an image
surface. This is a more realistic test of what a paginated surface is
and should be more useful as an example of how to use the paginated
surface, (and in particular the analysis portions).
2006-04-14 11:05:35 -07:00
Carl Worth
41dc06d711 Add new PS-specific image for dash-zero-length test.
This reference image demonstrates the bug that occurs when we emit zero-length
dash segments into a PostScript file with butt caps.
2006-04-14 10:08:31 -07:00
Jeff Muizelaar
584109d5e6 Add test case for dashed lines.
The new test case tests a variety of circumstances involved with zero length dashing.
2006-04-13 23:38:02 -04:00
Carl Worth
08b109fb9a Add new ps-specific reference image for dash-caps-joins test.
With the recent fix to the treatment of sub-paths with respect to
dashing, this test is now correct except for slight difference in
ghostscript vs. cairo rasterization. This commit records the
ghostscript output as the new reference image against which the ps
output should be tested.
2006-04-10 11:00:26 -07:00
Carl Worth
f02aacbb5f Update dash-caps-joins test cases to show independent dashing of sub-paths.
We would like to be compatible with PostScript/PDF dash semantics. And
according to the description of the setdash operator in section 8.2 of
the PostScript Language Reference Manual, (as well as the description
of the line dash pattern in section 4.3.2 of the PDF Reference), each
sub-path should be treated independently with respect to dashing.

With this change, this test now fails for most backends for which it
previously passed.
2006-04-10 10:54:24 -07:00
Carl Worth
b87726ee2a Tweak initial erase so it doesn't trigger fallbacks for every PS test case.
Add an optimization to cairo-ps-surface.c so that it ignores any
CAIRO_OPERATOR_CLEAR drawing operation that occurs on a blank page.
Also change the test suite to erase with OPERATOR_CLEAR instead of
OPERATOR_SOURCE with an all-0 source pattern.

With this change, 32 of the 61 test cases change from all-fallback to
all-native for the ps backend.

Of these 32 test cases, 13 pass the test suite with the original
reference images. Another 18 cases differ only in the single-pixel
boundary of objects due to cairo vs. ghostscript rasterization
differences. We ignore these by adding new ps-specific reference
images, (included in this commit).

Finally, there appears to be one genuine failure, (dash-caps-joins),
in which the PostScript dashes (at least as rendered by ghostscript)
differ significantly from the cairo-rendered dashes.
2006-04-06 09:43:39 -07:00
Carl Worth
c4fc7b06b5 Revert "Use ghostscript's pngalpha rather than png16m target for PS->PNG"
This reverts 3b873c66be commit.

It seemed like a good idea at the time, but...
The pngalpha target only gets the fully transparent regions correct.
But we still need to get the partially translucent regions correct.
The pngalpha target doesn't help here---instead we were already
flattening the reference image during testing. And in that case,
having anything other than alpha==1 in the output png doesn't really
help, (and meanwhile it was tripping up the current buffer_diff code).
2006-04-06 08:54:59 -07:00
Carl Worth
e01047a76a Build fix for typo from recent commit. 2006-04-05 17:15:48 -07:00