Commit graph

1731 commits

Author SHA1 Message Date
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
107a52ed61 Paint with white to intermediate RGB24 images before replaying meta-surface to preserve default white background instead of forcing a black background instead. 2006-01-11 16:29:17 +00:00
Carl Worth
ebeaeeccec Note that PS backend has now been switched over to use cairo_paginated_surface_t.
Switch from ARGB32 to RGB24 for intermediate image surface since that's all that the current users of cairo_paginated_surface support anyway.
Switch cairo_ps_surface_t over to use the new cairo_paginated_surface_t. This drastically simplifies the implementation, but temporarily puts the PostScript output back into the land of one-image-per-page. To be fixed soon though with improvements to cairo_paginated_surface_t. Everything still passes the test suite which is good. The test suite currently does no testing of multi-page output, which is quite bad.
2006-01-11 16:01:25 +00:00
Carl Worth
c23d7d4758 Note that from here on out, the PDF output should always pass the entire test suite!
Add new functions needed by users of cairo_paginated_surface_t.
Always snapshot a paginated surface to an image surface, rather than a surface similar to the target. We do this since paginated target surfaces are allowed to not be complete surfaces, (such as not implementing acquire_source_surface).
Switch the implementation of cairo_pdf_surface_t to use cairo_paginated_surface_t. For now this means that all PDF output is fallback images, but this can change incrementally as we go forward.
2006-01-11 11:53:33 +00:00
Anders Carlsson
953561ebbd Remove old scale matrix since it exists in our base class.
(_cairo_atsui_font_set_metrics): Fix descent calculation.
2006-01-10 07:54:17 +00:00
Anders Carlsson
ae807fc936 Add cairo-quartz-private.h
If the destination surface is a quartz surface, get the clip mask from it.
Added.
Keep a copy of the clip mask around.
(_cairo_surface_is_quartz): New function which determines if a given surface is a quartz surface.
2006-01-10 05:28:59 +00:00
Carl Worth
d6cb82c372 Add printf format attribute to cairo_test_log. 2006-01-09 17:18:12 +00:00
Anders Carlsson
ff5207ed11 Use uint32_t instead of uint; 2006-01-09 10:29:22 +00:00
Carl Worth
7ce7b20a82 Reviewed by keithp
Change the paginated surface to force all output to come from an image surface (to be refined incrementally as we hook real surface backends up to it).
2006-01-06 14:24:55 +00:00
Carl Worth
fbb8a62797 Reviewed by keithp
Implement copy_page for paginated surface. Fix show_page to destroy the meta-surface and create a new one.
Change these functions to advertise when they are not supported, so that _cairo_paginated_copy_page can implement things differently depending on whether or not it is personal.
Check return values from _cairo_surface_show/copy_page.
2006-01-06 14:11:07 +00:00
Carl Worth
88875100d6 Slip 1.2.0 projected data (again) out to 2006-01-13. Note that win32 is now incorporated into the test suite and is only failing two tests (self-copy and trap-clip). Note new progress on cairo_push/pop_group. Add item to support pango's hex-box drawing. Note that gradient computation performance has been improved. Note that experimental SVG backend has been added. 2006-01-05 15:17:02 +00:00
David Reveman
6995a83597 Gradient updates in SVG backend and no sorting of color stops in SVG or PDF backend 2006-01-05 15:00:37 +00:00
David Reveman
4215048025 Update gradient code in glitz backend 2006-01-05 05:14:14 +00:00
David Reveman
5ac6e85455 Update gradient code in PDF backend 2006-01-05 05:06:50 +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
Carl Worth
19441311e4 2005-10-10 David Reveman <davidr@novell.com>
Some major performance improvements to the general composite code used for gradients and transformed images. Like fetching of mask scanline before source scanline so that only the necessary pixels from source needs to be computed in case of gradients or transformed images as source. This patch also include some gradient specific fixes and performance improvement.
2006-01-04 16:39:23 +00:00
Carl Worth
305a83721f Originally: 2005-10-10 David Reveman <davidr@novell.com>
Add entries for gradient support.
Add PictureGradientColor.
Add necessary functionality for gradient support.
Enable gradient support.
2006-01-04 16:26:10 +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
Emmanuel Pacaud
71369489d8 no more has_clip boolean. Init clip_level. (_cairo_surface_intersect_clip_path): a NULL path means reset of clipping region, not back to previous clipping level. 2005-12-30 14:16:10 +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
Emmanuel Pacaud
f7236b8460 namespace declarations for SVG and XLINK (#5411). 2005-12-28 02:28:56 +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
f036c28fa3 Implement composite for the beos backend. Don't map CAIRO_OPERATOR_ADD to B_OP_ADD for now, something's broken there. 2005-12-26 19:08:53 +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
36850c7f32 Remove some unneeded backend functions (composite, fill_rectangles, composite_trapezoids, old_show_glyphs). 2005-12-21 17:08:28 +00:00
Carl Worth
0a009c925f Don't implement create_similar for the test-meta or the paginated surface. This was slowing things down a _lot_ (about 11× for the mask test for example) without any improvement in output quality. We can revisit this again later if there's any output improvement to be had down the road. 2005-12-21 17:04:01 +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
c786853993 Here is a cleaner implementation of the _cairo_array_t change which was previously committed inadvertently.
Fix buggy implementation of _cairo_array_snapshot by changing array->elements to be a pointer to a pointer. This extra level of indirection allows the snapshot array to point to a pointer which will itself get changed when new storage is needed for a growing array. Previously, the snapshot would be left pointing at stale storage.
Fix to call _cairo_array_index rather than grabbing array->elements directly and casting (which cast is now wrong with the change in implementation of array->index).
2005-12-21 16:35:32 +00:00
Carl Worth
122a83643b Revert inadvertent commit (immediately previous). 2005-12-21 12:20:06 +00:00
Carl Worth
5280c09b7d Fix indentation. 2005-12-21 12:08:57 +00:00
Carl Worth
3eb2a252ad Remove cruft from old commands that the meta surface no longer implements (composite, fill_rectangles, composite_trapezoids, and set_clip_region). 2005-12-21 12:07:25 +00:00
Christian Biesinger
088c664b9c Fix some typos 2005-12-21 08:19:47 +00:00
Emmanuel Pacaud
90c1837e17 store surfaces in a <g> node, and clip to surface area. Now SVG backend should pass pixman-rotate test. (emit_composite_svg_pattern): emit transformation matrix. (_cairo_svg_surface_intersect_clip_path): don't use xmlBuffer here. 2005-12-21 07:25:01 +00:00
Carl Worth
e95376c1c3 Add some comments describing what a cairo_meta_surface_t is.
Remove unused _test_fallback_surface_create_for_data.
Remove unused _test_meta_surface_create_for_data. Add missing source file src/test-meta-surface.h.
2005-12-20 10:30:11 +00:00
Carl Worth
7cc38be7d1 Move more fallback code from cairo-gstate.c to cairo-surface-fallback.c where it belongs. In the process, clean up the function names a bit and make the whole mess static. 2005-12-20 09:37:15 +00:00
Carl Worth
ff486bec0f Begin moving fallback code out of cairo-surface.c and into cairo-surface-fallback.c. 2005-12-19 22:45:41 +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
Christian Biesinger
606d23b287 Use correct color when OPERATOR_SOURCE is used on a surface without alpha information. 2005-12-19 17:16:28 +00:00
Emmanuel Pacaud
d0eaab305c fix stroke linewidth and dashes, I hope. Emit stroke-dashoffset. 2005-12-19 15:33:32 +00:00
Keith Packard
a83a42b248 Use NULL clip instead of special serial zero cairo_clip_t Should make using surfaces easier. 2005-12-19 15:08:05 +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
70c45dd502 Some final changes to the beos backend before checkin were wrong, fixing. 2005-12-19 11:01:42 +00:00
Christian Biesinger
9af7220b68 Use gtk-doc syntax rather than doxygen syntax for internal functions (to avoid warnings from gtk-doc when it processes this file) 2005-12-19 10:17:22 +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
Christian Biesinger
93da7fa203 Move enum to cairoint.h
add CAIRO_BEGIN_DECLS and CAIRO_END_DECLS, and move an enum from cairo-clip-private.h here (C++ doesn't like forward-declarations of enums). Final patch for allowing C++ backends.
reviewed by: cworth
2005-12-18 16:37:14 +00:00
Christian Biesinger
2c8859c8b5 make the SVG backend freetype message actually mention SVG rather than PDF. 2005-12-16 16:23:04 +00:00
Carl Worth
464d3fc563 Return a test_fallback_surface_t rather than a cairo_image_surface_t for better testing, (otherwise, an image surface would meet the semantic demands of create_similar just fine). 2005-12-16 11:48:48 +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