Commit graph

275 commits

Author SHA1 Message Date
Kristian Høgsberg
c9f545672a Implement image compression (taken from cairo_ps_surface.c). 2005-01-05 17:46:31 +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
Carl Worth
7a5a3cb208 Remove unused CAIRO_TRAPS_GROWTH_INC.
Resize arrays by doubling rather than by linear increments.
Add new bug exposed centi_unfinished.svg.
2004-12-23 13:49:56 +00:00
Carl Worth
e5d48545e0 Rename __internal_linkage to cairo_private and move it to the beginning of the line for function declarations. Also, drop unneeded "extern" from function declarations. 2004-12-21 13:22:44 +00:00
Carl Worth
1a21b8289f With thanks to Kristian Høgsberg <krh@bitplanet.net>:
Tag a few private functions/data that were missing __internal_linkage.
Mark cache backends as static.
2004-12-21 13:14:45 +00:00
Alexander Larsson
153bf60b3a Fix bug in earlier change. 2004-12-20 12:22:50 +00:00
Carl Worth
eecfec86f1 Re-enabled __internal_linkage for all internal functions. Now avoid the warning by moving the * from the return type after the __internal_linkage macro. It looks awaful, but it keeps the compiler quiet. 2004-12-20 09:53:06 +00:00
Alexander Larsson
5c1c5e67dc Add _cairo_gstate_restore_external_state, _cairo_fixed_integer_floor and _cairo_fixed_integer_ceil.
Call _cairo_gstate_restore_external_state on restore.
Fix cache-misses.
Implement floor and ceil
Restore surface clip region on restroe.
(_calculate_region_for_intermediate_clip_surface), (_cairo_gstate_clip_and_composite_trapezoids), (_cairo_gstate_show_surface), (_cairo_gstate_show_glyphs): Create intermediate clip surfaces of the minimal required size.
2004-12-20 09:43:59 +00:00
Carl Worth
e3fe2138fe Split off from _cairo_xlib_surface_create to avoid roundtrip when size is already known. (cairo_xlib_surface_create): Simplified to just call XGetGeometry that defer to _cairo_xlib_surface_create_with_size. Add comment about remaining roundtrip and possible plans to eliminate it later with a new interface requiring width/height. 2004-12-20 08:52:47 +00:00
Carl Worth
725d363877 Change return value from cairo_status_t to cairo_int_status_t to match definition in cairo_surface_backend_t. 2004-12-20 07:38:38 +00:00
Carl Worth
31534f264c Add bug about gcc 3.4 warning: '__visibility__' attribute ignored on non-class types.
Remove __internal_linkage macro from all functions returning pointers to shut up warning from gcc 3.4.
2004-12-20 07:32:45 +00:00
David Reveman
cb0364a28c Revert clipping changes 2004-12-01 16:27:18 +00:00
Carl Worth
d098370411 Remove unintentional copyright statement from user-generated output image. 2004-11-29 14:11:26 +00:00
Carl Worth
5c143241df Note that text_cache_crash is expected to fail.
Add test to demonstrate bug when item is too big for cache.
Really remove that refcount assertion this time.
2004-11-23 13:38:09 +00:00
Carl Worth
7478ea5051 Add note that bug has been fixed. (main): Instrumentation code for testing cache destruction.
Support tests that produce no output, (don't check image if (width,height) == (0,0)).
Add #include <assert.h> here rather than in multiple .c files.
Add const qualifier to static cache_arrangements table. (_cache_sane_state): Remove refcount assertion as it it false during the cairo_cache_destroy. (_cache_sane_state): #include <assert.h> moved up to cairoint.h (_entry_destroy): Fix bug in assertion (used_memory >= entry->memory), not >. (_cairo_cache_destroy): Fix timing of refcount decrement so that the destroy function actually works.
2004-11-23 12:53:46 +00:00
Carl Worth
78f1206bf8 Don't destroy a NULL font. 2004-11-14 10:07:54 +00:00
Carl Worth
2b76ec2d46 Unconditionally destroy the old font, (otherwise, if the same font was selected twice in a row, a reference was lost to it, leading to assertion failures). 2004-11-13 19:46:18 +00:00
Stuart Parmenter
d29237e9c0 Added GDI+ backend to Cairo. 2004-11-12 14:46:23 +00:00
Carl Worth
b6a2e10301 Move declarations above statements to satisfy pre-C99 compilers. Thanks to Michael Johnson <ahze@ahze.net>. 2004-11-12 06:12:20 +00:00
Graydon Hoare
ed08ea6bba Change the signs of a variety of metrics, which were backwards.
Return early if we found a rectangular clip at all, not just in error case.
Give render glyphset entry the negative bbox offsets it wants, not the bearings.
2004-11-05 10:57:50 +00:00
David Reveman
ca61417f7d Tracking changes to glitz 2004-11-03 15:28:37 +00:00
David Reveman
f1cf7d4331 Fixed return status of _cairo_gstate_clip 2004-11-03 15:05:24 +00:00
Olivier Andrieu
32cde60a05 remove cairo_ft_font_destroy() prototype. 2004-11-01 07:58:27 +00:00
Carl Worth
f8e632ab1e Add initial regression test suite.
Don't AC_SUBST a dozen different FOO_CFLAGS and FOO_LIBS. Instead, incrementally build up just CAIRO_CFLAGS and CAIRO_LIBS.
Don't list flags that should get picked up via dependency information through Requires.
Add description of move_to_show_surface.
2004-10-26 14:38:43 +00:00
Carl Worth
bf8374dba2 Convert all files to utf-8. Add copyright information to cairo_png_surface.c. 2004-10-21 18:40:50 +00:00
Carl Worth
215d5c5a46 Fix comparison so that it results in a stable sort. This should fix some rendering bugs due to broken pens. 2004-10-21 18:26:25 +00:00
Keith Packard
f9b0020850 Compute extents of cairo_traps_t on the fly using approximate method which is correct given the way cairo generates trapezoids.
Avoid zero-dimensioned pixmaps
2004-10-12 14:17:23 +00:00
Carl Worth
047ce33600 Fix a few typos in pen vertex math description. 2004-10-12 14:09:37 +00:00
Keith Packard
cc890b9cf4 Adapt function from Walter Brisken to compute pen ellipse major axis length and use that to compute the required number of pen vertices.
reviewed by: Carl Worth <cworth@cworth.org>
2004-10-12 12:29:29 +00:00
Graydon Hoare
30131aa463 Add cairo_cache.c
Rewrite using temporary glyph arrays
New file.
Remove old glyph cache code. (_cairo_font_scale) (_cairo_font_transform): Remove font-transforming code. (_cairo_font_text_extents) (_cairo_font_text_bbox) (_cairo_font_show_text) (_cairo_font_text_path): Remove text-API code. (_cairo_font_cache_key_t): New structure type. (_font_cache_hash) (_font_cache_keys_equal) (_font_cache_create_entry) (_font_cache_destroy_entry) (_font_cache_destroy_cache): New font cache code. (_global_font_cache) (_lock_global_font_cache) (_unlock_global_font_cache) (_get_global_font_cache): New global font cache. (_cairo_font_text_to_glyphs) (_cairo_glyph_cache_hash) (_cairo_glyph_cache_keys_equal) (_image_glyph_cache_create_entry) (_image_glyph_cache_destroy_entry) (_image_glyph_cache_destroy_cache): New glyph cache code. (_global_image_glyph_cache) (_cairo_lock_global_image_glyph_cache) (_cairo_unlock_global_image_glyph_cache) (_cairo_get_global_image_glyph_cache): New global glyph cache. (_cairo_font_cache_backend): New structure. (_cairo_image_cache_backend): Likewise. (_cairo_font_create): Reimplement in terms of font cache. (_cairo_font_init): Remove matrix and glyph cache related code. (_cairo_font_copy): Likewise. (_cairo_font_show_glyphs): Delegate to surface when possible. (_cairo_font_glyph_extents) (_cairo_font_glyph_bbox) (_cairo_font_glyph_path) (_cairo_font_font_extents) (_cairo_font_show_glyphs): Rename to as cairo_unscaled_font_XXX, and add scale parameter.
New structure types. (_create_from_face) (_reference_font_val) (_destroy_font_val) (_create_from_library_and_pattern): New functions. (_ft_font_cache_hash) (_ft_font_cache_keys_equal) (_ft_font_cache_create_entry) (_ft_font_cache_destroy_entry) (_ft_font_cache_destroy_cache): New ft font cache code. (_global_ft_cache) (_lock_global_ft_cache) (_unlock_global_ft_cache) (_get_global_ft_cache): New global ft font cache. (_ft_font_cache_backend): New structure. (_cairo_ft_font_create): Rewrite to use cache. (_cairo_ft_font_destroy): Likewise. (_cairo_ft_font_copy): Remove. (_install_font_matrix): Rename as _install_font_scale. (_utf8_to_glyphs): Rename as _cairo_ft_font_text_to_glyphs. (_cairo_ft_font_text_to_glyphs): Use cache for metrics. (_cairo_ft_font_extents): Accept size, use scaled metrics. (_cairo_ft_font_glyph_extents) (_cairo_ft_font_glyph_bbox) (_cairo_ft_font_show_glyphs) (_cairo_ft_font_glyph_path): Modify to use size, cache. (_cairo_ft_font_text_extents) (_cairo_ft_font_text_bbox) (_cairo_ft_font_show_text) (_cairo_ft_font_text_path): Remove text-API code. (cairo_ft_font_create) (cairo_ft_font_create_for_ft_face) (cairo_ft_font_face) (cairo_ft_font_pattern): Rewrite using ft_font_val_t.
Just reference font. (_cairo_gstate_fini): Finalize font matrix. (_cairo_gstate_default_matrix): Initialize font matrix. (_cairo_gstate_clip): Re-enable clipping rectangle. (_cairo_gstate_select_font) (_cairo_gstate_set_font): Set font matrix to identity. (_cairo_gstate_scale_font): Scale font matrix, not font. (_cairo_gstate_transform_font): Transform font matrix, not font. (_cairo_gstate_set_font_transform): Install as font matrix, not in font. (_build_font_scale): New helper function. (_cairo_gstate_text_to_glyphs): New function. (_cairo_gstate_current_font_extents) (_cairo_gstate_glyph_extents) (_cairo_gstate_show_glyphs) (_cairo_gstate_glyph_path): Rewrite using font matrix and size. (_cairo_gstate_text_path (_cairo_gstate_text_extents) (_cairo_gstate_show_text): Remove text-API code.
Minor bug fix. (_cairo_xlib_surface_show_glyphs): New function. (_cairo_xlib_surface_backend): Add reference to new function. (glyphset_cache_t) (glyphset_cache_entry_t): New structure types. (_next_xlib_glyph): New helper function. (_xlib_glyphset_cache_create_value) (_xlib_glyphset_cache_destroy_cache) (_xlib_glyphset_cache_destroy_value) (_xlib_glyphset_cache_backend): New glyphset cache code. (_xlib_glyphset_caches) (_lock_xlib_glyphset_caches) (_unlock_xlib_glyphset_caches) (_get_glyphset_cache): New global glyphset cache.
Add NULL entry for show_glyphs.
Add NULL entry for show_glyphs.
Add NULL entry for show_glyphs.
Add NULL entry for show_glyphs.
Add NULL entry for show_glyphs.
New structure type. (cairo_cache_entry_base_t) (cairo_cache_arrangement_t) (cairo_cache_t): New structure types. (_cairo_cache_init) (_cairo_cache_reference) (_cairo_cache_destroy) (_cairo_cache_lookup) (_cairo_hash_string): New cache functions. (CAIRO_IMAGE_GLYPH_CACHE_MEMORY_DEFAULT) (CAIRO_XLIB_GLYPH_CACHE_MEMORY_DEFAULT) (CAIRO_FONT_CACHE_NUM_FONTS_DEFAULT) (CAIRO_FT_CACHE_NUM_FONTS_DEFAULT): New constants. (cairo_font_scale_t) (cairo_glyph_cache_key_t) (cairo_image_glyph_cache_entry_t): New structure types. (_cairo_lock_global_image_glyph_cache) (_cairo_unlock_global_image_glyph_cache) (_cairo_get_global_image_glyph_cache) (_cairo_glyph_cache_hash) (_cairo_glyph_cache_keys_equal): New functions for glyph caches. (cairo_font_backend_t): Remove text-API calls, add scale params, remove copy call. (cairo_surface_backend_t): Add show_glyphs entry. (cairo_glyph_surface_t) (cairo_glyph_surface_node_t): Remove old glyph cache structures. (cairo_unscaled_font_t): New structure type. (cairo_font): Remove glyph cache member, add pointer to unscaled. (cairo_gstate): Add font_matrix member, change to hold unscaled. (_cairo_gstate_set_font_transform) (_cairo_gstate_current_font_transform) (_cairo_gstate_text_to_glyphs): New functions. (_cairo_gstate_text_path (_cairo_gstate_text_extents) (_cairo_gstate_show_text) (_cairo_font_text_extents) (_cairo_font_text_bbox) (_cairo_font_show_text) (_cairo_font_text_path): Remove text-API code. (_cairo_font_glyph_extents) (_cairo_font_glyph_bbox) (_cairo_font_glyph_path) (_cairo_font_font_extents) (_cairo_font_show_glyphs): Add scale parameter.
2004-10-08 12:09:49 +00:00
David Reveman
56ccb88376 Do not use VBOs and PBOs for immediate mode drawing 2004-10-04 04:55:46 +00:00
Jamey Sharp
978e2dd0d6 Update for minor XCB API change. 2004-09-30 13:34:19 +00:00
David Reveman
96dfd5db64 Important fixes to glitz format handling 2004-09-19 22:11:04 +00:00
David Reveman
c150ea0855 Improved format handling, pixel transfers and gradients 2004-09-15 09:55:40 +00:00
David Reveman
3deeb1d178 Get pixel masks from pixman image format 2004-09-12 15:34:00 +00:00
David Reveman
93c27d48a3 cairo_surface_t pointer to cairo_surface_set_repeat 2004-09-12 05:09:32 +00:00
David Reveman
4af8faee06 Pickup repeat setting when cloning surface 2004-09-11 19:05:46 +00:00
David Reveman
786904f1aa Tracking color stop coordinate changes to glitz's gradient filters 2004-09-11 07:59:27 +00:00
David Reveman
27d2de8c2d Replaced the gl backend with the new glitz backend 2004-09-11 04:23:17 +00:00
Carl Worth
0f3ce6a240 Add the MPL as a new license option, in addition to the LGPL. 2004-09-04 06:38:34 +00:00
Carl Worth
31d0ddbf2a Make a copy of the region since pixman is currently taking ownership of it (ugh). Thanks to Vladimir Vukicevic <vladimir@pobox.com> and Peter Dennis Bartok <peter@novonyx.com>. 2004-08-14 07:21:52 +00:00
Carl Worth
62e4b869cd Temporarily disable rectangle-based clipping optimization as it's not working (see cairo_snippets/xxx_clip_rectangle for a test case). 2004-08-03 11:49:20 +00:00
Carl Worth
e5afa03605 Fix to explicitly refer to GNU Lesser Public License 2.1 rather than the Library Public License version 2 or 'any later version' 2004-08-02 17:04:00 +00:00
Carl Worth
d5e92dd1c8 Change from MIT license to LGPL. 2004-08-02 13:13:28 +00:00
Carl Worth
b0a6de8f0b Fix copyright attributions mistakenly attributed to University of Southern California rather than to David Reveman. 2004-08-02 12:14:57 +00:00
Øyvind Kolås
0e3770e820 s/ct/cr/ 2004-08-01 23:03:02 +00:00
Jamey Sharp
fe2ca7e7af Updating for XCB API change around iterators. 2004-07-24 19:30:05 +00:00
David Reveman
7f87ea9a9e Tracking changes to glitz 2004-07-20 01:39:23 +00:00
David Reveman
c95e622675 Fixed typo in earlier memory leak fix 2004-07-16 10:25:31 +00:00
David Reveman
b306adead8 Fixed glyph cache memory leak 2004-07-15 13:38:21 +00:00