Commit graph

725 commits

Author SHA1 Message Date
Carl Worth
a70e8f7c9e Add deprecation alias from cairo_scale_font to cairo_set_font_size. 2005-04-11 11:30:28 +00:00
Carl Worth
9ba4dce811 Add deprecation alias from cairo_select_font to cairo_select_font_face. 2005-04-11 11:20:08 +00:00
Owen Taylor
cf9ea30078 src/cairo.h doc/public/cairo-sections.txt src/cairo-matrix.c: Update.
Include cairo-font.xml
2005-04-11 09:18:51 +00:00
Carl Worth
df997b3f5b Indentation changes 2005-04-11 06:56:10 +00:00
Carl Worth
2a616d6842 Move include of pixman.h from cairo.h to cairoint.h since libpixman isn't part of cairo's public interface.
Use unsigned long rather than uint32_t since we no longer have pixman.h setting that type up for us.
Remove unused variable user_data_copy.
2005-04-08 14:06:32 +00:00
Carl Worth
584cb30145 Add ROADMAP file with an initial stab at 1.0 items. 2005-04-08 13:44:22 +00:00
Owen Taylor
c803908d95 src/cairo.h src/cairo-font.c src/cairoint.h doc/public/cairo-sections.txt: Add cairo_font_face_set/get_user_data().
src/cairo-array.c src/cairoint.h src/cairo-surface.c: Refactor user data code from cairo-surface.c into cairo_user_data_array_t.
Switch these types to be like cairo_surface_t where the generic code frees the wrapper object.
src/cairo-atsui-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Fix up for the above changes.
Implement a complicated mutual-referencing scheme to make sure that a face from cairo_ft_font_face_create_for_ft_face() is freed only when the FT_Face is no longer needed.
Update the docs to describe how to figure out when the FT_Face can be freed.
Fix refcount leaks when creating fonts.
Remove excess call to _cairo_unscaled_font_reference().
Remove stray initialization of font matrix to the identity.
test/user-data.c: Fix a bug when setting/unsetting a key with a free key slot before it, add that to the test case.
Don't append an element when user_data is NULL.
2005-04-08 13:14:17 +00:00
Dave Beckett
7aa5b71e8c Update to track changes to cairo_matrix_t interface. 2005-04-08 12:42:28 +00:00
Carl Worth
30f0d517aa Eliminate internal use of deprecated cairo_matrix_copy.
Change cairo_get_matrix to accept a pointer to the return value cairo_matrix_t rather than returning the value directly.
2005-04-08 10:03:17 +00:00
Carl Worth
745627ff1b Don't try to return a value (even a void value) from a void function. Closes bug #2931. 2005-04-08 04:43:06 +00:00
Carl Worth
43435b69e1 Remove broken code for defining uint64_t. 2005-04-07 15:00:46 +00:00
Carl Worth
9bef5b6f14 Change to allow NULL backend function pointers to indicate unsupported functions.
Eliminate stub functions and replace with NULL in surface backend table.
2005-04-07 14:25:00 +00:00
Owen Taylor
ac6f15e245 src/cairo.[ch] src/cairoint.h src/cairo-gstate.c docs/public/cairo-sections.txt: cairo_select_font() => cairo_select_font_face() cairo_scale_font() => cairo_set_font_size() cairo_transform_font() => cairo_set_font_matrix() Add cairo_get_font_matrix(). Make cairo_set_font_face() not reset the font matrix. Default the font matrix to SCALE(10). Document cairo_select_font_face().
test/text-cache-crash.c (draw) test/text-rotate.c (draw): Use cairo_set_font_size().
src/cairo-font.c src/cairo.h: Fix up some parameter names for docs.
2005-04-07 13:29:32 +00:00
Carl Worth
62212867d4 Minor changes to header file inclusion recommended by Oleg Smolsky for better portability to MSVC. 2005-04-07 12:56:43 +00:00
Owen Taylor
4a3a6e8719 Fix various compilation errors. 2005-04-07 12:38:02 +00:00
Carl Worth
3ea3186f16 Use a preprocessor macro to get a literal value in the array size declaration, (for better portability to lame compilers that can't deal with a const int variable for the array size). Reported by Oleg Smolsky. 2005-04-07 12:35:33 +00:00
Carl Worth
88a62f07df Use a preprocessor macro to get a literal value in the array size declaration, (for better portability to lame compilers that can't deal with a const int variable for the array size). Reported by Oleg Smolsky. 2005-04-07 12:33:06 +00:00
Carl Worth
d4209c331f Use configure-time checks for stdint.h vs. inttypes.h vs. sys/int_types.h rather than ad-hoc system-specific macros. Also define these types manually none of these header are available. (Thanks to Jason Dorje Short <jdorje@users.sf.net>). 2005-04-07 12:05:52 +00:00
Carl Worth
945e6c2458 Fix to return non-zero status on error. 2005-04-07 11:18:40 +00:00
Owen Taylor
47824dee31 src/cairo.h src/cairo-gstate.c src/cairo-font.c: Add a cairo_font_face_t type to hold a description of a font face. Replace cairo_set_font() with cairo_set_font_face().
src/cairoint.h src/cairo-font.c src/cairo-gstate.c: Add "cairo_simple_font_face" for family/weight/slant and use it to implement font naming for the toy API.
src/cairo-ft.h src/cairo-ft-font.c cairo-win32.h cairo-win32-font.c: Switch the FreeType and Win32 backends over to using cairo_font_face_t.
src/cairo.h src/cairo-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Pass in font matrix and CTM separately rather than as a composite scale when creating fonts; allows removing font_matrix argument to metrics functions.
src/cairoint.h src/cairo-font.c src/cairo-ft-font.c src/cairo-win32-font.c: Remove cairo_font_scale_t type, just use cairo_matrix_t and ignore translations.
src/cairo-ft.h src/cairo-ft-font.c: Remove cairo_ft_font_get_pattern() -- it can't work for all FreeType backend fonts and doesn't seem particularly useful.
Rename cairo_font_get_extents() to cairo_font_extents()
split font functions into a separate section.
Fix locking order problem.
Add caches for simple font faces and from cairo_font_face_t to cairo_scaled_font_t.
src/cairo.h src/cairoint.h src/cairo-font.c src/cairo-win32-font.c src/cairo-ft-font.c src/cairo-gstate.c src/cairo-gstate-private.h: Rename cairo_font_t to cairo_scaled_font_t.
2005-04-07 11:03:59 +00:00
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
770d4c55b4 Remove items for PNG backend removal and trapezoid reasterization re-implementation since they have been completed. 2005-04-04 09:25:47 +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
19a918e624 Fix typo I had introduced into Jason's patch that made configure fail. 2005-03-30 14:00:31 +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
72cc8f96fe src/pixman.h: add AIX to the test for inttypes.h 2005-03-29 11:45:52 +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
35b9e3c45d More _/- renames in the test directory. 2005-03-29 00:02:19 +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
Carl Worth
18c8846bc0 Sorted API shakeup chart. 2005-03-28 14:06: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
9bcfb831fa More updates to the API Shakeup chart. 2005-03-23 14:02:36 +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