Commit graph

7375 commits

Author SHA1 Message Date
Carl Worth
8cb451962b Fix typo that caused cairo_image_surface_create_from_png_stream to segfault. Closes bug #3863 (thanks to Steve Chaplin).
Add a test to actually call cairo_image_surface_create_from_png_stream.
2005-07-27 09:23:29 +00:00
Owen Taylor
e859afecce Deal with glyphs with entry->im->image NULL. (This can happen if fonts have size-zero bitmaps for some characters, for example) (http://bugzilla.gnome.org/show_bug.cgi?id=311709, Sangu Kim) 2005-07-27 06:45:37 +00:00
Owen Taylor
e056a72ec8 FreeType bitmaps may only be padded out to 8-bit boundaries, not 32-bit boundaries. (_render_glyph_bitmap): Fix sign error in using glyphslot->bitmap_left 2005-07-27 04:07:46 +00:00
David Reveman
1467168326 Fix infinite loop bug in xlib backend 2005-07-26 22:36:00 +00:00
Carl Worth
ea1218a434 Replace all occurences of refcount with ref_count.
Replace refcounted with reference-counted.
2005-07-25 16:23:05 +00:00
Owen Taylor
85b74d8216 src/cairo.[ch] src/cairo-gstate-private.h src/cairo-gstate.c src/cairoint.c: Add cairo_{get,set}_font_options().
Add cairo-xlib-private.h
Update
reviewed by: cworth
2005-07-25 12:29:23 +00:00
Owen Taylor
fcd8867a47 Fix size of allocated buffer for vertical subpixel rendering. (Reported by Fryderyk Dziarmagowski, http://bugzilla.gnome.org/show_bug.cgi?id=310935) (_get_pattern_load_flags): Fix a problem where we were OR'ing multiple FT_LOAD_* flags together.
Fix reversed check for subpixel or not.
2005-07-24 05:18:15 +00:00
Malcolm Tredinnick
d527428bb6 Slight change to previous commit based on feedback from cworth. 2005-07-23 09:48:13 +00:00
Malcolm Tredinnick
563dddd81c Add some missing parameters for API docs. 2005-07-23 09:36:00 +00:00
Owen Taylor
9fb898898e src/cairo-xlib-private.h src/cairo-xlib-screen.c: Switch to using Screen * not screen number to match surface code.
Get the screen info for the right screen for the surface.
2005-07-23 05:37:23 +00:00
Owen Taylor
399b00a99b Protect against division by zero in various places. (http://bugzilla.gnome.org/show_bug.cgi?id=311299, reported by Ali Akcaag 2005-07-22 15:15:15 +00:00
Owen Taylor
5fb1c80333 Patch from Tor Lillqvist <tml@novell.com>
Define TT_PRIM_CSPLINE if it wasn't in the headers. (_get_system_quality): Add missing variable smoothing_type.
2005-07-22 07:15:57 +00:00
Carl Worth
dd9d984ab9 Get the case right. It's cairo, not Cairo. 2005-07-22 02:04:59 +00:00
Owen Taylor
857c9fe1c4 The FT_LOAD_TARGET_* flags aren't separate bitfields, but rather an embedded subfield, so test with FT_LOAD_TARGET_MODE (val->key.flags) == FT_RENDER_LCD, and similar. 2005-07-21 18:12:21 +00:00
Keith Packard
3c0bfb3975 Add ARGB glyph support.
Change Bi-level glyph support to use A1 format.
Support bit/byte swapping of glyph image data in the Xlib backend.
reviewed by: cworth, otaylor
2005-07-21 14:31:28 +00:00
Carl Worth
a3ad7dc0b9 Whitespace fixes. 2005-07-21 11:26:31 +00:00
David Reveman
9c6299c164 Fix empty glyph issue in glitz backend 2005-07-21 08:50:20 +00:00
Keith Packard
b3dfbe94c3 Add cairo_xlib_surface_set_drawable which changes the target drawable for an xlib cairo_t to another which shares the same format, screen and display.
reviewed by: otaylor, cworth
2005-07-21 08:45:57 +00:00
Owen Taylor
075cf23cdc src/cairo-font-options.c src/cairo.h src/cairoint.h src/Makefile.am: Add an opaque cairo_font_options_t structure.
src/cairo-font.c src/cairo.h src/cairoint.h: Add a cairo_font_options_t object to cairo_scaled_font_create().
src/cairo-surface.c src/cairoint.h: Add virtualized cairo_surface_get_font_options() to get the font options for a surface.
Adapt to cairo_scaled_font_create() change.
Add an implementation of get_font_options() that turns off metrics hinting.
src/cairo-xlib-screen.c src/cairo-xlib-private.h: Add a "screen info" structure that holds (for now) information about the default font options for the screen.
Implement get_font_options()
src/cairo-ft-font.c src/cairo-ft.h: Add functions to apply a cairo_font_options_t to a FcPattern or get the load flags for a cairo_font_options_t.
Adapt to font options additions. Add support for non-antialiased rendering of scalable fonts. Add support for turning off metrics hinting.
Adapt to font options additions.
doc/public/Makefile.am doc/public/cairo-sections.txt: Update.
reviewed by: cworth
2005-07-21 06:52:13 +00:00
Carl Worth
a43c9eb7b0 Finally grepped through and fixed up the last remaining calls to cairo_pattern_release_surface. 2005-07-21 00:35:07 +00:00
Carl Worth
133d7f0b44 Fix yet another file that I missed when I made the cairo_pattern_release_surface change. You would think that I would have grepped for all uses of this function by now. 2005-07-20 23:30:08 +00:00
Carl Worth
689fdfb6ea Fix macro to not consider CAIRO_FORMAT_ARGB32 (==0) as a valid cairo_content_t. 2005-07-20 19:23:19 +00:00
Keith Packard
88cf98fe33 Add Screen* arguments to:
cairo_xlib_surface_create_with_xrender_format cairo_xlib_surface_create_for_bitmap
Required to correctly identify when two Xlib surfaces are compatible with Core and Render rendering requests.
cairo_xlib_surface_create can determine the screen given the required Visual *
reviewed by: otaylor
2005-07-20 18:52:31 +00:00
Carl Worth
0e40baa9a7 Fix the quartz backend so that it at least compiles again. This change is slipped in before 0.5.2 was pushed out and tagged. 2005-07-18 09:23:33 +00:00
Carl Worth
d3661b0d53 Remove cairo_private qualifier from .c files, (we only need it in the .h files). 2005-07-15 13:59:47 +00:00
Vladimir Vukicevic
8ad8aa6360 Use XCopyArea when possible, for optimization and bug workaround.
Exercise XCopyArea, XRenderComposite, and XSetTile/XFillRectangle paths for _cairo_xlib_surface_composite
2005-07-15 13:45:19 +00:00
Carl Worth
3a053c1e58 Fix memory leak, (missing _cairo_pattern_fini). 2005-07-15 01:05:56 +00:00
Carl Worth
6df1baa395 Call _cairo_array_fini on the several array objects to patch memory leaks. 2005-07-14 17:52:17 +00:00
Carl Worth
df181620c0 Eek. Yet _more_ fixups for _cairo_pattern_release_surface missed earlier. 2005-07-14 16:56:08 +00:00
Stuart Parmenter
174056f736 blue and green values were swapped in the DO_SOURCE case. 2005-07-14 16:50:58 +00:00
Carl Worth
d8500060a9 Fix up one more call to _cairo_pattern_release_surface missed in the previous commit. 2005-07-14 15:47:18 +00:00
Carl Worth
3cd006bb2b Fix to accept a cairo_pattern_t rather than a cairo_surface_t as the primary argument.
Track change in _cairo_pattern_release_surface and also pass the appropriate pattern for each acquired surface. The previous backend mismatch was causing memory leaks.
Remove stale comment.
Add missing fclose to keep valgrind happy about memory leaks.
2005-07-14 15:10:47 +00:00
Carl Worth
0c3ee348f8 Add missing (putatively unreachable) return value. 2005-07-14 11:48:40 +00:00
Carl Worth
14ea7b583b Remove the copying of the region. This was a workaround for a missing copy bug in libpixman that has since been fixed. So now it was just a memory leak. 2005-07-14 11:45:39 +00:00
Carl Worth
513e9e6fe5 Patch memory leak of png_info object. 2005-07-14 11:24:56 +00:00
Kristian Høgsberg
3a46944637 Use the _cairo_surface_*() functions when replaying.
Fold the "locate fallbacks" pass into the postscript output pass, and add a simple, first implementation of image fallbacks.
2005-07-13 12:32:51 +00:00
Carl Worth
aafc2e7497 Rename CAIRO_FONT_BACKEND_DEFAULT to the more accurate CAIRO_SCALED_FONT_BACKEND_DEFAULT. 2005-07-13 11:34:37 +00:00
Carl Worth
6725cc9d7f New predicates to allow checking for cairo_ft derivates of generic font type.
Add explicit checks for cairo_ft derivatives of generic fonts rather than just blindly assuming that's what we get.
2005-07-13 11:01:25 +00:00
Carl Worth
dda555de99 Remove destroy notifier. This simplifies the implementation a bit, and no anticipated use of cairo_hash_table_t in cairo needs the destroy notifier. Most uses will be hash-backed object create/destroy functions.
(_cairo_hash_table_destroy): Document that it is now a fatal error to call _cairo_hash_table_destroy on a non-empty hash table.
(_cairo_hash_table_insert): Document that it is now a fatal error to insert an entry with a key that matches an existing entry.
(_cairo_hash_table_random_entry): Add predicate function so that the user can select a random entry satisying the given predicate.
(_cairo_hash_table_remove): Change return type to void since failure is really not possible here.
2005-07-12 14:43:37 +00:00
Carl Worth
abdaf7555f Add cache lock deadlock problem to roadmap for 0.5.2.
Disable mutex locks, (making the caches non-thread-safe again, just like they were in the last snapshot and before).
2005-07-11 16:07:08 +00:00
Carl Worth
48e5806f1e Note that the cairo_content_t work is done.
Note that this function is computing an incorrect result.
2005-07-11 13:29:45 +00:00
Carl Worth
9a2ba48b29 Give enum tags an underscore prefix to match the style of the struct tags. Add new cairo_content_t and change cairo_surface_create_similar to accept a cairo_content_t rather than a cairo_format_t.
Change surface backend create_similar call to accept a cairo_content_t rather than a cairo_format_t.
Fix all calls into create_similar to pass a cairo_content_t rather than a cairo_format_t.
2005-07-08 10:12:28 +00:00
Carl Worth
f766e06d25 Remove CAIRO_STATUS_NO_TARGET_SURFAC and add CAIRO_STATUS_INVALID_STATUS.
Don't check for gstate->target == NULL anymore as the API now guarantees it never occurs.
Check that path->status is a valid status value and cause an INVALID_STATUS error otherwise.
Test the new CAIRO_STATUS_INVALID_STATUS error case in cairo_append_path.
2005-07-06 14:52:01 +00:00
Carl Worth
ad0e040fb6 Disable the compilation of the _ps_locate_fallbacks code which, inaddition to being broken, appears to not currently be used. 2005-07-05 22:30:59 +00:00
David Reveman
e314e86cc1 Use frame buffer objects for accelerated offscreen drawing in glitz backend 2005-07-04 03:58:43 +00:00
Kristian Høgsberg
7a923e6ddd Rewrite postscript backend to generate more interesting output than the current big-image implementation, using meta surfaces for font subsetting and image fallbacks.
Remove obsolete comment.
Make a couple of stylistic changes and add _cairo_output_stream_write_hex_string.
Add _cairo_surface_intersect_clip_path so we can replay path clipping.
2005-07-01 12:45:35 +00:00
Kristian Høgsberg
7ab5dbfa75 Add meta surface implementation.
Add cairo-meta-surface.c and cairo-meta-surface-private.h
2005-07-01 12:22:23 +00:00
Carl Worth
4e01c4aa2f Remove debugging printfs. 2005-06-29 17:05:31 +00:00
Carl Worth
aad6dce6bc Add _cairo_hash_table_random_entry.
Fix to update live_entries.
style changes.
Add code to shrink table as well as to grow it.
Call new version of resize so that table will grow or shrink as needed on insert and remove.
2005-06-29 17:02:37 +00:00
Carl Worth
e7ffbb4179 Rewrite hash table to use a single cairo_hash_entry_t* rather than void *key and void *value. This is slightly more painful to use, but lends itself to a more memory-efficient implementation. Add documentation. 2005-06-29 15:02:10 +00:00