Commit graph

1900 commits

Author SHA1 Message Date
Carl Worth
464c6dffcf Add Radek Doulík.
Add test exposing a BadValue (0-size pixmap) bug in cairo-xlib-surface when everything is clipped away (thanks to Radek Doulík <rodo@novell.com>).
2005-08-31 09:00:01 +00:00
Carl Worth
77a0ae7439 Fix cairo_show_text to advance the current point. Add documentation for cairo_show_text.
Add test to verify that the current-point-advancing behavior of cairo_show_text is working.
Remove bug about cairo_show_text not advancing the current point.
2005-08-24 01:13:36 +00:00
Carl Worth
ee3e72e6a9 Add suppression for uninitialized data in fbBltOne. 2005-08-23 19:34:20 +00:00
Carl Worth
2dfb7a662f Fix memory leak of pattern. 2005-08-23 14:37:09 +00:00
Owen Taylor
f229b1abfb when creating the temporary mask, do glyph ADD mask, not (glyph IN source) ADD mask. Set the mask as having component alpha when it's 4-channel.
test/text-antialias-subpixel.c test/Makefile.am: No longer XFAIL.
test/text-antialias-gray.c test/text-antialias-subpixel.c
Don't turn off metrics hinting, it doesn't make sense.
Update.
2005-08-23 13:34:14 +00:00
Carl Worth
317af5618c Fix inadvertent commit of incorrect reference image 2005-08-23 10:55:00 +00:00
Carl Worth
9aa1f4d868 Clear to opaque white at the beginning of the test so that the 0 alpha values in the destination don't cause bizarre results. (main): Note that only the image backend should fail now.
Add new reference image.
2005-08-23 10:39:27 +00:00
Carl Worth
9e68e0ceef Add more comments on the improved state of this bug. Commit a reference image generated with cairo_text_path; cairo_fill. (We may not require getting this exact result, but I think it is worth examining the differences closely.) 2005-08-23 10:11:16 +00:00
Carl Worth
60f9c8d9fd Remove caps-sub-paths from the XFAIL list since it is fixed now. 2005-08-23 07:51:56 +00:00
Owen Taylor
099060f925 Some fixes for warnings from sparse (Part of #4208, Kjartan Maraas)
Use NULL, not 0.
Fix C99'ism of mixed code and declarations.
2005-08-23 05:18:48 +00:00
Carl Worth
eb206f0a12 Use the expect_failure variant of cairo_test so that make check prints the reason this test fails. 2005-08-23 01:50:25 +00:00
Carl Worth
4b0ed008ba Add test to demonstrate bug #4205, missing caps on all but last sub-path in a complex path. 2005-08-23 01:02:16 +00:00
Carl Worth
190dc79a28 Fix typo that was causing make dist to fail. 2005-08-22 13:59:52 +00:00
Owen Taylor
31e4ade4ab Use floor(0.5+x) rather than round(), which is C99. (David Hollenberg) 2005-08-22 08:45:46 +00:00
Billy Biggs
33599bc6b6 Fix for bug #4172:
Use _cairo_fixed_to_double and _cairo_double_to_fixed when converting between double and 16.16 fixed point. These functions round nicely, and solve some inconsistencies in rendering between my PPC and x86 machines. Thanks to Owen Taylor for suggesting the fix.
The above change does affect linear gradients slightly, but it seems worth it. Update the reference images to follow.
2005-08-21 14:10:39 +00:00
Billy Biggs
17845df95b Fix for bug #4165:
Use pointer comparison for coincident points to ensure a well-defined ordering, and avoid setting discard on both points. This fixes problems with my Mac's implementation of qsort. Final patch by Bertram Felgenhauer.
Update reference images after the change.
2005-08-21 11:41:44 +00:00
Carl Worth
d1bdd1313e Fix for bug #4142:
Disable xlib tests on X servers without the Render, since they currently just crash there. A better long-term fix would be to do some useful tests in this case. Thanks to Tim Mooney.
2005-08-20 07:56:05 +00:00
Carl Worth
465ff18786 From Bertram Felgenhauer <int-e@gmx.de>:
Add regression test for bug #4137 (fixed earlier).
2005-08-19 16:37:56 +00:00
Billy Biggs
33b45c1572 No need to include cairo-pdf.h. 2005-08-19 14:42:57 +00:00
Carl Worth
2b72a4eee8 Fix for bug #2729:
Adjust negative offsets up to their equivalent positive value. Add error checking for dash values, (must each be non-negative and must not be all zero).
Add documentation.
Add new CAIRO_STATUS_INVALID_DASH.
Add dash-offfset-negative test from Owen.
churn
2005-08-19 12:02:14 +00:00
Carl Worth
b626dff5b9 Fix for bug #3915:
Add new NULL_POINTER nil pattern.
Check for surface == NULL and return a nil pattern.
Verify that the above fix works.
2005-08-19 07:39:47 +00:00
Carl Worth
435fb3c65f Fix for bug #4088:
New function to return the current nil pattern depending on the status.
Add missing early bailout on surface->status with error propagation to the pattern.
Related cleanups for cairo_pattern_t:
Don't check other->status since this is a static function.
Add missing early bailout on other->status.
Cleanup identifier names.
Track rename of nil patterns.
Don't call _cairo_error for pre-existing errors.
Take care to initialize some fields to that _cairo_pattern_release_surface will work even after an error.
Track rename of cairo_solid_pattern_nil to cairo_pattern_nil.
New test to ensure that a file-not-found error will propagate from a surface, through a pattern, and onto a cairo_t.
2005-08-18 23:10:37 +00:00
Carl Worth
0e56f2ea0a Suppress a pthread initialization error now that tests are linked with -lpthread. 2005-08-18 22:43:39 +00:00
Owen Taylor
c1b5a19624 Fix offset passed in for source patterns. (#2333, Tim Rowley)
Fix font to Vera Sans rather than "Sans"
2005-08-18 17:19:54 +00:00
Owen Taylor
16f66dc314 Add a test for bug #2333 (Tim Rowley) 2005-08-18 16:22:23 +00:00
Owen Taylor
31341327bf Implement new equations for CLEAR and SOURCE CLEAR: (mask IN clip) ? 0 : dest SOURCE: (mask IN clip) ? src : dest That behave more like what people expect.
CLEAR and SOURCE are now bounded.
Assert that SOURCE and CLEAR aren't passed to these functions.
Assert that SOURCE and CLEAR aren't passed to these functions when there is a mask.
Do fixups for SOURCE and CLEAR as well as unbounded operators, since in the absence of a mask, we need SOURCE to work correctly (don't care about CLEAR)
_cairo_ft_font_show_glyphs) Consistently use CLEAR/TRANSPARENT (source doesn't matter) rather than SOURCE/TRANSPARENT when clearing rectangles.
src/cairo-xlib-surface.c src/cairo-surface.c: Use IN rather than SOURCE as an example of an unbounded operator in docs.
Remove CLEAR/SOURCE columns since they are no longer unbounded.
test/operator-clear.c test/operator-source Makefile.am: Add targetted tests of CLEAR/SOURCE.
2005-08-18 15:50:36 +00:00
Carl Worth
7a9d207040 Disable not-yet-implemented quartz stuff. 2005-08-18 09:19:21 +00:00
Carl Worth
639680e5fe Fixes for bug #4110:
Don't call _cairo_ft_unscaled_font_init_key in the from_face case, just clear filename and id instead. Initialize unscaled->base first so that initialization order matches the structure declaration order.
Fix to accept a NULL string and hash it identically to a zero-length string.
Add a test that calls cairo_ft_font_create_for_ft_face to demonstrate bug #4110.
2005-08-17 09:51:09 +00:00
Billy Biggs
f5f21a768d Fix the filter-nearest-offset test to actually test CAIRO_FILTER_NEAREST. 2005-08-16 21:04:02 +00:00
Carl Worth
620de68bea Turn the mutex code back on. It looks like the deadlocks have disappeared as of the cairo_scaled_font_map patch from two days ago.
Setup an automake conditional for the HAVE_PTHREAD case.
Link all tests with -lpthread if available, so that we can get some testing of cairo with mutexes turned on.
2005-08-13 03:26:18 +00:00
Billy Biggs
58c51ff137 Update to match the output from libpixman. 2005-08-10 21:12:10 +00:00
Keith Packard
eacc1e95a5 Place private include directives before CAIRO_CFLAGS in case pixman remains installed in the system. 2005-08-10 13:32:06 +00:00
Carl Worth
0fc4192104 From Keith Packard <keithp@keithp.com>,
Build pixman internally as a private part of cairo, with suitable name changes to avoid any visible pixman symbols in the cairo library:
Descend into pixman.
Drop libpixman from Requires.
Don't check for libpixman. Check version of pkg-config and use Requires.private instead of Requires in cairo.pc if possible. Generate pixman Makefiles.
Rip out release-publish target and installation of libpixman.pc.
Add pixman-remap.h. Drop libpixman.la target.
Fix to include config.h rather than ../config.h
This is the cpp magic to rename all pixman functions from the various fb, Fb, INT_pixman, pixman, Render, _Render, or no prefix to _cairo_pixman_ prefixes.
Include pixman-remap.h to get all the cairo-internalized names.
Add -Ipixman/src to get at pixman-remap.h.
2005-08-10 12:36:51 +00:00
Carl Worth
a391bb451a Note that sane clipping is done now. Add release versions for previously completed items.
Ignore unantialiased-shapes.
2005-08-09 12:35:09 +00:00
Carl Worth
4d2b8bddde Fix typo that was holding up make distcheck from working. 2005-08-08 20:57:13 +00:00
Billy Biggs
53444c286e Add a new API for disabling antialiasing of shapes drawn by cairo. This is a hint and is not supported by all backends.
Store the antialiasing mode in the gstate and pass it to the backend for trapezoid rendering and for clipping.
Pass the antialiasing parameter down to the backend where appropriate.
Pass the antialiasing parameter down to the backend where appropriate.
Add support for A1 format trapezoid rendering, and remove the _create_mask_image function, creating a temporary image from memory we allocate and clear.
Support A1 masks to disable antialiasing using the RENDER extension when requested.
Support A1 masks to disable antialiasing using the RENDER extension when requested.
Blindly pass through the antialising parameter.
Add the antialiasing parameter but don't support it.
Add a test case and a reference image from the latest libpixman.
Add the new antialiasing disabling API to the docs.
Update progress on a parameter to disable antialiasing.
reviewed by: cworth, otaylor
2005-08-08 18:35:22 +00:00
Carl Worth
578b45c903 Ignore clip-operator and unbounded-operator. 2005-08-08 17:32:24 +00:00
Owen Taylor
d4b24dc974 Add reference images 2005-08-08 13:50:02 +00:00
Owen Taylor
8f19aaf9a8 Add a function to test whether a cairo_operator_t is bounded (does nothing for 0 src/mask)
cairoint.h: Add a helper function to take clearing areas that are outside the source/mask but are cleared by unbounded operations.
src/cairo-xlib-surface.c (_cairo_xlib_surface_composite): Use _cairo_surface_composite_fixup_unbounded() as needed.
src/cairo-image-surface.c src/cairint.h: Keep track of whether the surface has a clip or not ... we need this for determining when we can bypass an intermediate mask for composite_trapezoids().
Create an intermediate mask of the right size with pixman_add_trapezoids() and composite that.
When rendering with an unbounded operator, create the intermediate mask ourselves and render with ADD to that, then composite the result.
Create an intermediate surface the size of the extents, render the glyphs to that then composite the results.
Add the size of the glyph
Compute the size of the glyph mask, then use _cairo_surface_composite_fixup_unbounded().
Use the right mask format. (Unrelated bugfix)
New function taking a drawing function as a parameter to encapsulate shared logic between compositing trapezoid, glyphs, and masks.
Use _cairo_gstate_clip_and_composite(). Also fix extents computations for unbounded operators.
src/cairo-clip.c src/cairo-clip-private.h (_cairo_clip_combine_to_surface): Add the destination as an extra parameter to allow combining to an intermediate surface.
tests/unbounded-operator.c tests/Makefile.am: Add a test for the operation of the 6 unbounded operators against different shapes.
tests/clip-operator.c tests/Makefile.am: Add a test that tests surface clipping with different shapes against all the operators.
Make use OVER like the name and description. With fixed semantics, SOURCE does something different.
2005-08-08 13:46:11 +00:00
Jeff Muizelaar
8c52b287f3 Give reason for failure. 2005-08-06 15:10:36 +00:00
Carl Worth
8d0452c1ee ignore a8-mask 2005-08-05 15:49:52 +00:00
Carl Worth
5925e3520f Patch memory leaks. 2005-08-05 15:48:42 +00:00
Jeff Muizelaar
53bd9879bb Add a test case for CAIRO_FORMAT_A8 masks that fails with libpixman. 2005-08-05 15:07:45 +00:00
Jeff Muizelaar
594ba3ef69 use the newly added buffer_diff_noalpha for comparing buffers of CAIRO_FORMAT_RGB24. 2005-08-05 11:23:51 +00:00
Jeff Muizelaar
5f78feda5d rewrite buffer_diff to be endian safe and add a new fuction buffer_diff_noalpha 2005-08-05 11:15:04 +00:00
Carl Worth
7d88cdd15b Remove unused variable. 2005-08-05 10:43:07 +00:00
Carl Worth
e59d1dff7f Ignore cairo-clip-private.h.
Drop non-existent cairo-atsui.xml.
Fix misnamed parameters in comment blocks.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
2005-08-05 10:40:32 +00:00
Carl Worth
a2dc18fd0c Remove include of math.h since cairoint.h does it more carefully, (for annoying platforms for which just including math.h without extra defines is not enough).
Replace Cairo with cairo.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
Fix non-UTF-8 copyright symbol.
2005-08-05 10:05:29 +00:00
Carl Worth
0586daaa29 Patch from John Ehresman <jpe@wingide.com> to aid win32 compilation:
Define snprintf as _snprintf when under the influence of _MSC_VER.
Define int32_t and friends as __int32 and friends when under the influence of _MSC_VER.
Make include of unistd.h conditional on HAVE_UNISTD_H.
2005-08-05 07:48:18 +00:00
Carl Worth
b45f688765 Fix for bug #3951:
Add new _CHECK_FUNCS_WITH_FLAGS to abstract out the pain of temporarily setting flags for AC_CHECK_FUNCS. Use this to check for the existence of FcFini.
Make call to FcFini conditional on HAVE_FCFINI.
Remove stale comment about cleaning up memory which is now handled by cairo-test.c.
2005-08-03 10:32:50 +00:00