Carl Worth
f0923288c5
Two fixes from Kristion Høgsberg:
...
Fix to close the file if we opened it.
Grab the status from out of the stream _before_ we destroy the stream.
2005-05-17 12:40:55 +00:00
Keith Packard
b4710711b8
Add some comments about how and why masks are computed. Generalize overflow detection in mask computation. Expand on pixman format conversion comment.
2005-05-17 12:21:56 +00:00
Carl Worth
e72c41f95b
Fix documentation to not mention set_size for the _for_bitmap functions.
2005-05-17 11:28:26 +00:00
Carl Worth
5cc39a708c
Remove #ifdef munging since we once again support either #if or #ifdef.
2005-05-17 09:13:02 +00:00
Carl Worth
ec84ace5a6
Update instructions to match output of 'make distcheck'
...
Add private headers and flesh out CLEANFILES so that 'make distcheck' actually passes.
2005-05-17 09:08:23 +00:00
Carl Worth
366aa98a79
Fix more deprecation macros
2005-05-17 08:34:44 +00:00
Carl Worth
23b7ac25ed
Add a few more REPLACED_BY and DEPRECATED_BY definitions.
...
Add some helpful warnings.
2005-05-17 08:26:37 +00:00
Carl Worth
f82a3b2b55
Add cairo-xlib-xrender.h which was missed from an earlier commit.
2005-05-17 06:12:52 +00:00
Carl Worth
30d7ede3df
Update cairo-xcb.h to provide the same style of interface as cairo-xlib.h.
...
Update to match new cairo_xcb_surface_t create functions.
2005-05-17 06:11:32 +00:00
Carl Worth
f67f5003df
Avoid shifting 32-bit quanity by 32 bits, which is undefined behavior.
2005-05-17 06:08:01 +00:00
Carl Worth
0c05b23b31
Rework of cairo_xlib_surface create functions by Keith Packard:
...
Add cairo_xlib_surface_create_with_render_format.
Reduce Xlib constructors down to two simple forms. Add width, height to constructors and eliminate any synchronous size queries from the implementation.
Update to match new cairo_xlib_surface_t create functions.
2005-05-17 06:05:13 +00:00
Carl Worth
84bc5a32d6
Remove destroy_closure from cairo_output_stream_t interface.
...
Remove destroy_closure argument from cairo_pdf_surface_create_for_stream. Rename width,height to width_in_points, height_in_points for better clarity.
Brush a bunch of dust off of the PS backend and bring it up to date with the latest API conventions from the PDF backend. These include: accepting a filename rather than a FILE in the primary constructor, providing a stream-based interface for more flexibility, and accepting a surface size in device-space units (points) rather than inches.
Make it a little more clear that the width and height being passed around are in units of points.
Update to the latest cairo-ps.h changes as described above. Notice how much more sane things become now that the surface size is described in device-space units.
2005-05-17 05:58:01 +00:00
Carl Worth
9bf26e8e73
Add simple test for ps surface backend (modeled after pdf-surface.c).
...
Add print message telling user to examine resulting file.
2005-05-17 01:05:35 +00:00
Carl Worth
189161118f
Update PDF test case to make sure we're actually getting the right paper size, image scaling etc. And it should now be easier to see if cairo is happy by manually viewing the resulting PDF file.
2005-05-17 00:54:09 +00:00
Carl Worth
9bf669a790
Fix to include cairo-xlib.h, (which also fixes test/xlib-surface.c).
2005-05-17 00:39:17 +00:00
Carl Worth
91dcaea6a2
Update to the latest PDF surface API changes: use filename not FILE* and use surface dimension in points, not inches.
2005-05-17 00:34:10 +00:00
Keith Packard
200bcda188
Initialize op->stops[0].scale = 0.
...
This scale value is used only when computing gradient values before the defined range, in which case stop 0 is used for both ends of the interpolation, making the value of 'scale' not actually matter, except that valgrind notices we're using an undefined value.
2005-05-16 22:31:36 +00:00
Carl Worth
e5b31bca7c
Remove quarter-over test name accidentally added to Makefile.
2005-05-16 15:05:56 +00:00
Kristian Høgsberg
ea410111d3
Take a filename instead of a FILE pointer.
2005-05-16 11:41:42 +00:00
Carl Worth
60b0a05df7
Brush the dust off the XCB backend and get it compiling and working again. This patch makes the XCB surface API match that of the Xlib surface API as of yesterday. But, it's already stale as the Xlib API changed again. So we'll need one more revision of the XCB backend before the next snapshot.
...
Add support for testing of the xcb backend as well.
2005-05-14 14:01:46 +00:00
Carl Worth
6a1af1999d
Cleanup output a bit, move verbose messages to test-specific log file.
2005-05-14 13:51:59 +00:00
Carl Worth
53e6fdb885
Fix the last commit so it actually compiles now.
2005-05-14 13:22:25 +00:00
Carl Worth
55366995b6
Fix a few documentation typos in the recent xlib surface rework.
2005-05-14 10:15:11 +00:00
Carl Worth
95859dc2c6
Add an #error if cairo-foo.h is included when cairo was compiled without support for the foo backend.
2005-05-14 10:03:56 +00:00
Carl Worth
f797eaac1c
Update for change in cairo_pdf_surface_create which no longer accepts DPI values.
2005-05-14 10:00:27 +00:00
Owen Taylor
bef4b13716
src/cairo-xlib-surface.c src/cairo-xlib.h doc/public/cairo-sections.txt: Drop the _for_pixmap() and _for_window() out of the create functions and use some lazy cleverness to sniff the information out as needed.
...
src/cairo-xlib-surface.c src/cairo-xlib-test.h Makefile.am: add cairo_test_xlib_disable_render() to turn off RENDER for tests.
Test various different types of Xlib surface creation.
Remove left-over include of Xrender.h.
2005-05-13 17:54:43 +00:00
Kristian Høgsberg
15ecc87763
Make this a varg function and use the new _cairo_output_stream_vprintf() function to format extra dict contents.
...
Reimplement the printf logic so we can special case formatting of doubles to be locale independent and trim trailing zeros.
2005-05-13 14:04:22 +00:00
Kristian Høgsberg
b9db66eb17
Rename cairo_pdf_surface_create_for_callback() to cairo_pdf_surface_create_for_stream(), and change PDF constructors to take width and height as points and move PPI setting to cairo_pdf_surface_set_ppi()
2005-05-13 09:26:20 +00:00
Owen Taylor
9ebf15e960
Fix misplaced goto.
2005-05-13 08:09:24 +00:00
Carl Worth
7c4a2b1d6e
Fix image->data to be unsigned
...
Track change in signedness of data member/parameter.
2005-05-12 23:11:55 +00:00
Carl Worth
d5ca4e37d7
Update xcb backend to compile after recent API changes:
...
Fix missing return value. (_cairo_xcb_surface_acquire_source_image): Remove calls to non-existent cairo_surface functions. (_cairo_xcb_surface_set_matrix): Update for new matrix member names. (_cairo_xcb_surface_get_extents): Fix typo.
2005-05-12 23:09:58 +00:00
Keith Packard
949daa1bc9
libpixman creates an A8 format object and sometimes forgets to destroy (when the bounds of the trapezoids are empty). Avoids creating the format object in that case.
...
reviewed by: cworth
2005-05-12 20:25:07 +00:00
Carl Worth
27d9c575a7
Add new test for bug in cairo_paint_with_alpha not transforming the source.
...
Use a transformed copy of the source just like we do in all the other calls to cairo_surface_composite. Fixes the bug tested by test/paint-with-alpha.
2005-05-12 11:02:35 +00:00
Keith Packard
52f41b7bf0
_get_mask_extents creates a pixman region but neglects to destroy it.
...
reviewed by: otaylor
2005-05-12 08:04:22 +00:00
Owen Taylor
e4e5b1f00d
Handle more cases by assuming no-super-luminescent colors.
2005-05-11 16:32:44 +00:00
T Rowley
b913a81c34
Revive quartz backend.
...
Set fill type repeat on source surface. (_cairo_glitz_surface_show_glyphs): Add missing cairo operator to glitz operator conversion. (_cairo_glitz_surface_show_glyphs): Only render glyphs with non zero size.
Fix bounding box computation.
2005-05-11 16:01:56 +00:00
Tor Lillqvist
3be31fee9a
Revive quartz backend.
2005-05-11 15:39:26 +00:00
David Reveman
ac278285c8
Avoid empty glyphs
2005-05-11 13:53:18 +00:00
David Reveman
bd168e15ca
Fix fill_rectangles and show_glyphs in glitz backend
2005-05-11 13:30:56 +00:00
Owen Taylor
59c2730b1d
src/cairo-xlib-surface.c src/cairo-xlib.h: Remove leftover cairo_xlib_surface_create().
2005-05-10 21:06:01 +00:00
Owen Taylor
0c7c224668
src/cairo.c src/cairo-path-data.c src/cairo-path-data-private.h: Pass the gstate to _cairo_path_data_create[_flat] and use _cairo_gstate_backend_to_user() so as to properly handle the surface device offset.
2005-05-10 20:45:54 +00:00
Carl Worth
4e1cce108b
Don't use return when calling a void function (thanks to Damien Carbery <damien.carbery@sun.com>). Closes bug #3134 .
2005-05-10 20:38:21 +00:00
Carl Worth
b05c85eafb
Removing mucking around with stderr and add a cairo_test_log function instead.
...
Switch all error messages from fprintf(stderr,...) to cairo_test_log(...).
2005-05-10 20:25:38 +00:00
Carl Worth
40796148b8
Fix URLs for glitz and xlibs, (thanks to Jason Dorje Short <jdorje@users.sf.net>).
2005-05-10 14:54:48 +00:00
Carl Worth
6f3215cb7f
Update to current canonical URL for XCB.
2005-05-10 14:48:05 +00:00
Carl Worth
3253534a82
Don't guess and make our own definitions for uint8_t, etc. Just error out if we can't find a suitable header file.
...
Fix to use fixed-size type so that this code works when sizeof(unsigned long) != 32. Thanks to Manish Singh.
2005-05-10 12:42:32 +00:00
Carl Worth
c66ca528e0
Fix cairo_get_font_matrix to actually use its out-parameter. And change the return type to void.
2005-05-10 12:22:41 +00:00
Owen Taylor
7b46c815d2
Get the glyphslot point *after* we get the FT_Face. (Robert O'Callahan)
2005-05-09 16:33:59 +00:00
Carl Worth
01b2526ceb
Fix deprecation macro to point to the right function, (thanks to John Ellson).
2005-05-09 10:41:17 +00:00
Carl Worth
14c690472c
Push cairo_matrix_t const-correctness down through the entire implmentation, (expanding on preliminary work by Robert O'Callahan <rocallahan@novell.com>)
2005-05-09 09:12:52 +00:00