Commit graph

12 commits

Author SHA1 Message Date
Carl Worth
c786853993 Here is a cleaner implementation of the _cairo_array_t change which was previously committed inadvertently.
Fix buggy implementation of _cairo_array_snapshot by changing array->elements to be a pointer to a pointer. This extra level of indirection allows the snapshot array to point to a pointer which will itself get changed when new storage is needed for a growing array. Previously, the snapshot would be left pointing at stale storage.
Fix to call _cairo_array_index rather than grabbing array->elements directly and casting (which cast is now wrong with the change in implementation of array->index).
2005-12-21 16:35:32 +00:00
Carl Worth
122a83643b Revert inadvertent commit (immediately previous). 2005-12-21 12:20:06 +00:00
Carl Worth
5280c09b7d Fix indentation. 2005-12-21 12:08:57 +00:00
Carl Worth
964c56e72b Note that self-copy now works with the PS backend.
Add _cairo_array_init_snapshot and checks for is_snapshot throughout.
Add a new surface->backend->snapshot function.
Implement _cairo_meta_surface_snapshot and _cairo_meta_surface_acquire/release_source_image. Change _cairo_meta_surface_create to require the width and height in pixels to be used when replaying for purposed of _cairo_meta_surface_aquire_source_image.
Track change in prototype of _cairo_meta_surface_create. Implement _cairo_ps_surface_snapshot by deferring down into _cairo_meta_surface_snapshot.
2005-12-07 12:19:10 +00:00
Carl Worth
632b948c8c Add new _cairo_array_allocate function for growing the array and getting a pointer to the buffer of new data. This is intended to be used in place of the abuse of passing data=NULL to _cairo_array_append_multiple.
Add new function to be used instead of the abuse of pasing data=NULL to cairo_pdf_ft_font_write.
Just return a status now instead of a pointer to the written buffer, since cairo_pdf_ft_font_allocate_write_buffer should now be used instead when a pointer is needed.
Switch to use cairo_pdf_ft_font_allocate_write_buffer.
Fix use of uninitialized status value.
initialization just to keep the compiler quiet about possibly uninitialized variables.
2005-11-07 13:23:31 +00:00
Carl Worth
9341c254a0 Rename old, rarely used _cairo_array_append to _cairo_array_append_multiple. Add much more common _cairo_array_append. Fix both to return a cairo_status_t. Remove undocumented code to allow a non-copying append when elements is NULL, (let's not encourage unintialized data, shall we?)
Cleanup to not rely on undocumented copy-avoidance in _cairo_array_append.
Track change in number of arguments and return value of _cairo_array_append.
2005-11-04 16:13:30 +00:00
Carl Worth
feef096e25 Add documentation for all _cairo_array interface functions. 2005-11-04 15:15:30 +00:00
Carl Worth
2b5d9c8e00 Add CAIRO_STATUS_INVALID_CONTENT, CAIRO_STATUS_INVALID_FORMAT, and CAIRO_STATUS_INVALID_VISUAL.
Change functions to return type of void:
cairo_scaled_font_extents cairo_surface_finish
Add new functions to query object status:
cairo_scaled_font_status cairo_surface_status
Implementation of new error handling scheme for cairo_surface_t and cairo_scaled_font_t.
Track change in return value of cairo_surface_finish.
2005-07-27 15:39:34 +00:00
Carl Worth
756e991b91 Fix name of _cairo_user_data_array_destroy to be _cairo_user_data_array_fini. 2005-06-03 16:16:44 +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
Kristian Høgsberg
2c6939b7ac Add preliminary text support, including support for truetype font subsetting.
Change type of 'surface' argument in show_glyphs to void * as it is for all other surface virtual functions.
Update accordingly.
Add check for endianess.
Fix bug in array growing loop. (_cairo_array_append): Accept NULL for elements argument, in which case we just allocate space in the array.
2005-01-17 09:40:00 +00:00
Kristian Høgsberg
b1ec8ae13e New PDF backend.
Add PDF surface constructors.
New file - generic array implementation.
Add cairo_array prototypes.
Add cairo_array.c and cairo_pdf_surface.c.
2005-01-05 14:29:31 +00:00