Commit graph

413 commits

Author SHA1 Message Date
Carl Worth
d135938efd Rework the cairo_matrix_t interface in several ways. Expose a struct for cairo_matrix_t.
Add new function to return current matrix: cairo_get_matrix
Deprecate the following functions (in documentation): cairo_matrix_create cairo_matrix_destroy cairo_matrix_get_affine
Rename: cairo_matrix_set_affine -> cairo_matrix_init cairo_matrix_set_identity -> cairo_matrix_init_identity
Add other new matrix initialization functions: cairo_matrix_init_translate cairo_matrix_init_scale cairo_matrix_init_rotate
Change return type of almost all cairo_matrix functions from cairo_status_t to void.
Track changes to cairo_matrix_t interface.
Add a test case showing the same path drawn under various transforms, (including skews set directly by initializing a cairo_matrix_t).
2005-04-07 10:01:49 +00:00
Carl Worth
92060c12ee Make handling of unsigned char* vs. char* consistent. Change all parameters that are actual string data from unsigned char* to char* (cairo_text_extents, cairo_show_text, cairo_text_path). Change all data buffers from char* to unsigned char* (cairo_write_func_t).
Track changes from unsigned char* to char*. Convert to unsigned only at the internal interface to unicode processing.
Track change from char* to unsigned char*.
2005-04-06 13:01:13 +00:00
Carl Worth
957ceac0c6 Fix reversed arguments in call to calloc. 2005-04-06 12:20:02 +00:00
Carl Worth
a6d9b6a671 Change type of data parameter from char* to unsigned char*.
Propagate the unsigned char* change down the stack.
Add cast since XImage uses char* rather than unsigned char*.
Fix memory leak of image data.
Switch to use cairo_surface_write_png rather than a custom write_png_argb32.
Add test to exercise the cairo_image_surface_create_for_png function.
2005-04-04 09:47:12 +00:00
Carl Worth
027057bf62 Drop cairo_default_matrix since it is now always identical to cairo_identity_matrix.
Remove gstate->pixels_per inch. Change default matrix to always be the identity matrix.
Drop pixels_per_inch function from surface backend interface as it is no longer needed.
2005-04-04 06:49:19 +00:00
Carl Worth
5778c77382 Use the current point to offset just the destination, not the source and destination. With this fix, cairo_show_surface should work with the current point at places other than the origin.
Move move-to-show-surface off the expected failure list.
Add comment indicating that bug is resolved.
Don't use diff to compare images, just imagediff.
2005-04-02 06:00:32 +00:00
Carl Worth
9e405876e8 Style and indentation fixes.
cast to quiet new gcc-4 warnings.
Initialize variables to quiet new gcc-4 warnings.
Use unsigned char* as expected by freetype, libpng, Xlib, and zlib.
Propagate unsigned char* down from cairo_text_extents.
2005-04-02 05:18:11 +00:00
Carl Worth
7636e90184 Update API shakeup chart.
Add a standin for the function that should be cairo_set_target_image which should then have some other name. We can straighten that mess out when we eliminate the set_target functions. Add deprecation alias for cairo_current_pattern.
Deprecate cairo_surface_create_for_image in favor of cairo_image_surface_create_for_data.
2005-04-01 18:00:00 +00:00
Kristian Høgsberg
5abf7786c0 Remove this function now that the PNG backend is gone. 2005-03-31 13:25:44 +00:00
Carl Worth
13b1b705f4 A few fixes courtesy of Jason Dorje Short <jdorje@users.sf.net>:
Disable PS backend if zlib is not found.
Fix mistyped parameter.
Fix missing return value.
2005-03-30 13:34:51 +00:00
Tor Lillqvist
811fe63f84 src/cairo-gstate.c (_cairo_gstate_stroke_extents): call _cairo_pen_init so that the result takes into account the caps. 2005-03-30 09:31:49 +00:00
Tor Lillqvist
a7a4aa34f8 src/cairo-xlib.h: include Xlib.h to fix solaris build bustage. 2005-03-29 11:54:01 +00:00
Tor Lillqvist
a55a640e54 src/cairo-wideint.h: add preprocessor tests for stdint.h/inttypes.h
src/cairoint.h: add preprocessor tests for stdint.h/inttypes.h
2005-03-29 11:48:58 +00:00
Tor Lillqvist
78b022b1d1 Update quartz backend to compilable/workable version and re-enable. 2005-03-29 11:24:10 +00:00
Carl Worth
d9c2be3dcd Renamed a bunch of files to use - rather than _ as a separator. Copy happened in the master repository to preserve history, so this is just a big remove. 2005-03-28 14:30:40 +00:00
Kristian Høgsberg
bd5bbb6ce2 New PNG utility functions.
Reverse the naming of the pdf constructors so the callback based ones have the long names.
2005-03-28 13:58:26 +00:00
Jamey Sharp
33d2ec2eb8 Fix "implicit declaration" warning in cairo.c by moving cairo_xcb_surface_create prototype into cairo-xcb.h. 2005-03-25 11:47:38 +00:00
Carl Worth
410e3ae8f2 Clean up names of cairo_path internals. 2005-03-23 14:36:29 +00:00
Carl Worth
5170c1f4d2 Remove unneeded includes of cairo-path-fixed-private.h.
Fix indentation.
2005-03-23 14:17:40 +00:00
Carl Worth
f218c14b9d Rename cairo_path_real_t to cairo_path_fixed_t and fix all _cairo_path functions to be named as _cairo_path_fixed functions.
Track name change of cairo_path_real_t and _cairo_path_fixed functions.
2005-03-23 13:52:54 +00:00
Carl Worth
0ba7a082af Remove CAIRO_BEGIN_DECLS and CAIRO_END_DECLS as they are not needed for private headers.
Add ASSERT_NOT_REACHED macro.
Rewrite in terms of cairo_copt_path and cairo_copy_path_flat in preparation for removing cairo_gstate_interpret_path.
2005-03-23 13:52:11 +00:00
Carl Worth
cb5bbd0aa7 Begin the process of breaking up cairoint.h, moving structure definitions of cairo_t, cairo_gstate_t, and cairo_path_real_t into their own header files.
Track changes to header files, reaching into the new private headers where necessary.
2005-03-23 13:50:51 +00:00
Carl Worth
9bb1715159 Move surface-specific cairo_t functions to cairo.c.
Remove functions that have now moved to cairo.c.
A few new files to ignore now with new compilation mode using a libtool helper library.
2005-03-23 13:49:32 +00:00
Carl Worth
12de3807b4 Add backwards-compatibility for recently renamed functions. 2005-03-23 13:31:01 +00:00
Carl Worth
b381eb8045 Rename functions to eliminate abbreviations: cairo_concat_matrix -> cairo_transform cairo_transform_point -> cairo_user_to_device cairo_transform_distance -> cairo_user_to_device_distance cairo_inverse_transform_point -> cairo_device_to_user cairo_inverse_transform_distance-> cairo_device_to_user_distance cairo_init_clip -> cairo_reset_clip 2005-03-20 23:23:19 +00:00
Carl Worth
c629df8616 * src/cairo.c: (cairo_copy_path), (cairo_copy_path_flat), (cairo_append_path): Rename cairo_copy_path_data, cairop_copy_path_data_flat, and cairo_append_path_data to cairo_copy_path, cairo_copy_path_flat, and cairo_append_path.
Add new cairo_path_t, containing a cairo_path_data_t array and an explicit length. Remove CAIRO_PATH_END_PATH terminator from cairo_path_data_t.
Rename the internal path object from cairo_path_t to cairo_path_real_t.
2005-03-18 14:28:53 +00:00
Kristian Høgsberg
987a13b814 Remove return statements from these functions (bug #2137). 2005-03-18 12:26:03 +00:00
Carl Worth
84a6da8f07 Remove unused libcairo_freetype_sources (thanks to Damien Carbery). Closes bug #2673. 2005-03-18 11:15:25 +00:00
Owen Taylor
2ad590a0ee doc fix - 90 degrees is MI_PI/2 radians.
src/cairo.c src/cairo_matrix.c src/cairo_ft_font.c src/cairo_ps_surface.c src/cairo_quartz_surface.c src/cairo_win32_font.c src/cairo_win32_surface.c src/cairo_xlib_surface.c: Cairo is only capitalized at the beginning of sentences.
2005-03-17 13:27:26 +00:00
Owen Taylor
e66e4c7b8c src/cairo.h src/cairo_surface.c src/cairo-xlib.h src/cairo_xlib_surface.c: Move cairo_xlib_surface_set_device_offset() to a generic cairo_surface_set_device_offset().
Take the surface's device offset into account.
Update.
2005-03-17 12:57:42 +00:00
Owen Taylor
0b09748296 Fix the docs to to correctly describe the order of transformation for muliply/scale/rotate/translate. (cairo_matrix_translate): Fix translate/rotate typo in the parameter descriptions. 2005-03-17 11:24:00 +00:00
Kristian Høgsberg
b481b85841 ChangeLog 2005-03-17 07:30:05 +00:00
Kristian Høgsberg
0f52fb2289 Dont call user data destroy function if it's NULL.
Add test case for user data with NULL destroy function.
2005-03-16 12:15:29 +00:00
Kristian Høgsberg
6993c086eb Add cairo_output_stream.c
Add new errors, CAIRO_STATUS_WRITE_ERROR and CAIRO_STATUS_SURFACE_FINISHED, add cairo_surface_finish() prototype, add cairo_write_func_t.
Add strings for new errors, documentation fix.
Rename surface destroy functions to finish and change them to not free the surface.
Change PDF surface constructors to take a write function in the general case and add stdio convenience constructors. Change destroy function to finish for cairo_pdf_surface. Change implementation to use cairo_output_stream_t functions for output.
Use _cairo_surface_show_glyphs instead of calling function pointer directly.
Add prototypes for cairo output stream functions, rename destroy to finish in cairo_surface_backend_t and add finished flag to cairo_surface_t.
Add cairo_surface_finish() and call it from cairo_surface_destroy(). Check the finished flag in cairo_surface_t in functions that change the surface.
2005-03-16 12:08:41 +00:00
Owen Taylor
5fecf69e2c src/cairo-xlib.h src/cairo_xlib_surface.c: Rework set of contructors for XLib surfaces. Add cairo_xlib_surface_set_size().
src/cairo-xlib.h src/cairo_xlib_surface.c: Add cairo_xlib_surface_set_device_offset().
Rewrite for clarity and efficiency.
Use a temporary pixmap to avoid possible BadMatch when fetch from windows.
src/cairo.[ch] src/cairo-xlib.h: Fix some parameter names for the docs.
Update
2005-03-15 16:25:30 +00:00
Carl Worth
a98430092f Added some documentation, so we get some churn here.
New functions: cairo_copy_path_data, cairo_copy_path_data_flat, and cairo_append_path_data.
Add new implementation for cairo_copy_path_data and cairo_append_path_data.
New test for new path_data functions.
2005-03-11 14:29:15 +00:00
Kristian Høgsberg
1f5394ffe9 *** empty log message *** 2005-03-10 09:28:50 +00:00
Carl Worth
c67ba13a6e Originally: 2005-02-24 Carl Worth <cworth@cworth.org>
Add const qualifier to cairo_user_data_key_t arguments.
Originally: 2005-02-15 Kristian Høgsberg <krh@redhat.com>
Add these two functions to set and get user data on an surface.
Function prototypes for new functions.
Test case for user data functions.
2005-03-10 08:59:11 +00:00
Carl Worth
6d4653fe22 Rename all the cairo_current functions to cairo_get functions instead. Add documentation for all of these functions (and a few others as well).
Add support so that old binarys should still run and old source should still compile, (though we'll rip that out again on the API Shakeup flag day).
2005-03-09 12:35:36 +00:00
Kristian Høgsberg
74416f2d9a Return CAIRO_STATUS_SUCCESS even if we don't implement masks yet, so we don't set cr->status to CAIRO_INT_STATUS_UNSUPPORTED. 2005-03-07 21:22:42 +00:00
Carl Worth
c4697bc572 Disable the "new" intersection code so that the incorrect fill problems (test/fill_rule) go away. 2005-03-07 14:23:07 +00:00
Owen Taylor
e7607bb379 Comment and clean up the gradient computation. (_cairo_linear_pattern_classify): Determine if a linear gradient is horizontal or vertical. (_cairo_pattern_acquire_surface_for_gradient): Optimize horizontal/vertical gradients with a repeating surface.
Test case for linear gradients at angles and with a rotated pattern matrix.
2005-03-06 12:05:23 +00:00
David Reveman
023d911232 Fix gradient acceleration in glitz backend 2005-03-06 05:16:19 +00:00
Owen Taylor
50b483042d src/cairo_win32_font.c src/cairo_win32_surface.c: Update for recent backend interface changes.
Reenable win32 backend by default.
2005-03-04 10:43:24 +00:00
Carl Worth
f6dcd38c8c Fix accidental reversal of condition in previous patch. 2005-03-04 10:07:22 +00:00
Owen Taylor
66af5f9f36 src/cairoint.h src/cairo_pattern.c src/cairo_glitz_surface.c: Add _cairo_pattern_is_opaque, use it rather than pattern->alpha == 1.0. 2005-03-04 09:41:34 +00:00
David Reveman
4552898cfb Update xcb backend 2005-03-03 20:16:23 +00:00
David Reveman
378fb57051 Add more mask surface acceleration to glitz backend 2005-03-03 18:55:28 +00:00
David Reveman
01b87c7d99 Add overall alpha acceleration using mask surface 2005-03-03 18:46:49 +00:00
David Reveman
50b5344d7d Pass mask to composite operation as pattern 2005-03-03 18:39:06 +00:00