Commit graph

4501 commits

Author SHA1 Message Date
Chris Wilson
fcdc525dde [cairo-xlib] Remove the NULL safeguards.
No need to guarding against the pointer being NULL on internal functions
as no path can call the function will a NULL pointer and no path should
ever try, which in any case it would be better to crash immediately.
2008-01-17 14:51:22 +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
dbc97c2576 [text] Set the extents on the error paths.
Ensure the text extents are initialized (zeroed) if we encounter an
error along for any of the text extents functions.
2008-01-17 13:41:19 +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
f638e5ea35 [cairo-region] Review status propagation.
Check that the error status is propagated from _cairo_region_*.
2008-01-17 11:50:51 +00:00
Chris Wilson
248f0060e5 [cairo-analysis-surface] Return the nil surface rather than NULL.
On error return a nil surface that represents the error rather than
making the assumption of a NO_MEMORY error in the caller.
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
3f202c081d [Makefile.am] Another path massage for lcov.
Beware the inline functions in the headers that are now being pulled
into the boilerplate code.
2008-01-16 23:42:24 +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
f9a80c06b4 [cairo-path-stroke] Convert degenerate splines into lines.
This fixes a discrepancy in the stoker between splines and lines,
whereby the stroker failed to add a dash for a zero length spline.
2008-01-16 23:28:27 +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
Chris Wilson
bb41fa22e3 [Makefile.am] Further massage lcov paths for srcdir != builddir.
The lcov scripts generate incorrect absolute paths to the builddir for
source files - so convert them to srcdir using sed.
2008-01-16 23:21:53 +00:00
Carl Worth
0a4ced5a26 Increment version to 1.5.7 after the 1.5.6 snapshot 2008-01-16 10:47:46 -08:00
Carl Worth
d2a02d4f5c Remove check-has-hidden-symbols.i on 'make distclean'
Without this, 'make distcheck' fails so releases don't happen.
2008-01-16 10:36:01 -08:00
Carl Worth
5c3a0b5c00 Add miter-precision-ref.png tothe distribution. 2008-01-16 10:22:44 -08:00
Carl Worth
cb1ddc4e47 Replace -I($builddir) with -I. to avoid breaking non-srcdir builds.
This variable was expanding to an empty string, so the next -I flag
was getting completely swallowed. Let's avoid being clever and just
use . which is what we want in the expansion anyway.
2008-01-16 10:15:34 -08:00
Carl Worth
ad8d03967a Increment version to 1.5.6 and to 15:0:13 2008-01-16 09:48:54 -08:00
Carl Worth
fe27f4b9a3 NEWS: Add notes for cairo 1.5.6 2008-01-16 09:48:54 -08:00
Chris Wilson
1bccbd88c3 [cairo-pdf-surface] Review error propagation from output stream.
Ensure that errors encountered whilst processing the output stream are
propagated back to the surface (and the user).
2008-01-16 17:02:52 +00:00
Chris Wilson
20151fc534 [cairo-ps-surface] Review error propagation during surface creation.
Track the error during surface creation so that it can be returned to
the user via _cairo_surface_create_in_error().
2008-01-16 17:01:03 +00:00
Chris Wilson
3daa63693c [cairo-svg-surface] Review error propagation during surface creation.
Track the error during surface creation so that it can be returned to
the user via _cairo_surface_create_in_error().
2008-01-16 16:52:51 +00:00
Chris Wilson
7111b18c27 [cairo-surface] Introduce _cairo_surface_create_in_error().
Unexport all the static error surfaces and use a function to select
the appropriate error surface for the status.
2008-01-16 16:51:32 +00:00
Chris Wilson
5cbc45488e [cairo-output-stream] Introduce _cairo_output_stream_create_in_error()
Use a utility function to wrap an incoming error status into a new
error stream. As a side-effect, all error streams must be destroyed as
in the general case the caller can not distinguish between a static
error object and one allocated to hold an unusual error status.
2008-01-16 16:40:01 +00:00
Chris Wilson
2c10c7559d [Makefile.am] Add -I$(builddir) for .c.i target
Updated the CPP command so that it can find <cairo-features.h> in the
local build directory.
2008-01-16 16:37:38 +00: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
Vladimir Vukicevic
57c2b75c22 [quartz] Store the CGFontRef and reuse it for rendering
Previously the CGFontRef was recreated each time in show_glyphs; this
caused the font to get re-embedded in any PDF files that were being
generated through Quartz.
2008-01-15 14:27:14 -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
Behdad Esfahbod
22d7f311f7 [scaled-font] Upgrade glyph mask as needed in case of mixed-format glyphs
In ecb895803b Carl made fallback show_glyphs
always use a A8 mask in case of mixed-format glyphs.  That's suboptimal if
there are ARGB32 glyphs.  Using masks smartly we can implement the desired
behavior.  Done now.
2008-01-14 16:14:02 -05: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
8d6249b2c1 [cairo-scaled-font] Add missing matrix guard to cairo_scaled_font_create().
cairo_scaled_font_create() did not check the user supplied ctm was valid,
triggering an assertion later when computing the scale factors.
2008-01-13 11:40:53 +00:00
Chris Wilson
3f59ef9548 [cairo-matrix] Tidy usage of HAVE_ISFINITE.
Use a macro to switch between isfinite() and its fallback in order to
avoid using an #ifdef from within a function.
2008-01-13 11:21:39 +00:00
Chris Wilson
5e32dcf863 [cairo-gstate] Check that the matrix remains invertible.
Ensure that the ctm remains invertible after multiplying the user
supplied matrices. Although the arguments are checked so that they are
valid per se, we double check that the result after multiplication is
still a valid invertible matrix. This should catch pathological cases
where the user concatenates a long series of matrix operations, which
either exceed our numerical limits or become degenerate through rounding
errors.
2008-01-13 11:14:20 +00:00
Chris Wilson
2f600affaa [cairo-gstate] Add isfinite guards to the transformation ops.
If we have isfinite() available use it to check that the user supplied
arguments are valid.
2008-01-13 11:02:55 +00:00
Chris Wilson
3fed79d1c2 [cairo-paginated-surface] Set error on surface for operations done its behalf.
Ensure that the error is propagated to the target surface if we fail
whilst performing an operation on its behalf, for example set the size
of the paginated surface.
2008-01-13 10:28:11 +00:00
Chris Wilson
481b88dd6b [cairo-pattern] Add an ASSERT_NOT_REACHED
On the default case for an unknown pattern type, add an assert that the
code is never reached, and just in case upgrade the error to a fatal
PATTERN_TYPE_MISMATCH.
2008-01-12 20:44:02 +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
6cc75cfe5b [cairo] Harden the text API against NULL strings.
Handle NULL strings in cairo_show_(text|glyph),
cairo_(text|glyph)_(extents|path) without crashing.
2008-01-12 10:30:15 +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
ae1e044e32 [cairo-matrix] Use isfinite() to check matrix determinant.
The current NaN check is insufficient as it classifies inf as a valid
determinant. We can improve the test by using isfinite() - but only
when it is available. We use the feature test macros as being the
simplest way of determining the presence of isfinite() as it may be
implemented as a macro, making checking for its usability troublesome
during configure.
2008-01-12 00:40:59 +00:00
Kouhei Sutou
3610841910 Fix typo in comment. 2008-01-11 14:40:06 -08:00
Chris Wilson
0b91240692 [check-plt.sh] Ensure that $MAKE is defined.
Copy the check from check-def.sh now that $MAKE is also used in
check-plt.sh
2008-01-11 21:58:09 +00:00
Chris Wilson
92c744978f [Makefile.am] Tweak the flags passed to CPP.
Adjust the flags passed to $(CPP) to match those used in the
surrounding targets (splint and sparse), which should improve their
reliability.
2008-01-11 21:58:09 +00:00
Behdad Esfahbod
36f5d69a11 [src/Makefile.am] Tweak includes a bit 2008-01-11 16:48:55 -05:00
Chris Wilson
ed113ef422 [check] Move the hidden symbol check into check-{def,plt}.sh
Behdad, once again the arbiter of good taste, objected to the use of
the dotfile within the Makefile, and suggested that one calls $MAKE to
pre-process the source file from within the check scripts.

Doing so removes the ugly wart added to Makefile.am...
2008-01-11 21:21:34 +00:00
Carl Worth
bcf0c442b9 Merge branch 'master' of git.cairographics.org:/git/cairo into cairo 2008-01-11 12:30:15 -08:00
Carl Worth
ecb895803b Migrate glyph mask to A8 in case of mixed-format glyphs.
This fixes the remaining image-backend problems with bug 13479:

	Ugly Courier New font with cairo 1.4.12
	https://bugs.freedesktop.org/show_bug.cgi?id=13479

although the xlib-backend had been fixed previously.

Specifically, if an A1 glyph is first encountered, then subsequent
glyphs will still be rendered with antialiasing, (previously they
would be rendered very poorly without antialiasing).

Similarly, if the first glyph encountered has component-alpha
sub-pixel antialiasing and then an A1 or A8 glyph is encountered
then all glyphs will rendered in A8 (grayscale antialiasing).
Previously, the non-subpixel-antialiased glyphs would not appear
at all.
2008-01-11 12:28:49 -08:00
Chris Wilson
8a6a0b43dc [check] Replace compiled symbol visibility checker with shell script.
Behdad Esfahbod objected to the execution of a compiled program to check
symbol visibility as it makes cross-compilation more difficult.

Instead of executing the program, this method conditionally exports
a variable if cairo uses symbol hiding and scans the executable for
that symbol in a similar manner to check-def.sh. This has the slight
advantage of using the Makefile for performing the compilation, rather
than attempting to invoke $(CPP) from a shell script within the test
environment.
2008-01-11 20:27:23 +00:00