summaryrefslogtreecommitdiff
path: root/src/cairo-image-surface.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Drop cairo_default_matrix since it is now always identical to ↵Carl Worth2005-04-041-8/+0
| | | | | | | 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.
* Style and indentation fixes.Carl Worth2005-04-021-1/+1
| | | | | | | 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.
* Update API shakeup chart.Carl Worth2005-04-011-0/+1
| | | | | 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.
* Add cairo_output_stream.cKristian Høgsberg2005-03-161-4/+4
| | | | | | | | | | 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.
* Pass mask to composite operation as patternDavid Reveman2005-03-031-36/+46
|
* Removed surface backend functions set_matrix, set_filter and set_repeatDavid Reveman2005-03-031-26/+0
|
* Change to cairo_surface_t like structure of of cairo_pattern_tDavid Reveman2005-03-031-56/+93
|
* Remove newline in comment which was confusing gtk-doc.Kristian Høgsberg2005-02-271-0/+36
| | | | Document these functions.
* Switch from broken cworth@isi.edu address to canonical cworth@cworth.org ↵Carl Worth2005-02-221-1/+1
| | | | address.
* src/cairoint.h src/cairo_image_surface.c src/cairo_pdf_surface.c ↵Owen Taylor2005-01-311-46/+114
| | | | | | | | | | | src/cairo_png_surface.c src/cairo_surface.c src/cairo_xlib_surface.c: Replace the get_image()/set_image() backend operations with a more specific {acquire,release}_{source,dest}_image() and clone_similar(). src/cairoint.h src/cairo_pattern.c: Replace _cairo_pattern_get_surface() with a _cairo_pattern_begin_draw()/_cairo_pattern_end_draw() pair. Save the format for which an image is created so we can access it later. (Needed for the _cairo_xlib_surface_clone_similar()) src/cairoint.h src/cairo_image_surface.c: Add _cairo_surface_is_image(). Add CAIRO_OK(status) to check for CAIRO_STATUS_SUCCESS. In the absence of of RENDER, make cairo_xlib_surface_create_similar() return an image surface. Don't try to use RENDER to composite glyphs in the absence of the RENDER extension.
* Fold _cairo_pattern_get_image into _cairo_pattern_get_surface and make sure ↵Kristian Høgsberg2005-01-271-11/+20
| | | | | | | | | we always return a surface of the same type as dest. Use _cairo_pattern_get_surface instead of _cairo_pattern_get_image. Remove use of _cairo_xlib_surface_clone_similar since _cairo_pattern_get_surface always gives us an xlib surface for the pattern. Clean up error handling code in _cairo_xlib_surface_show_glyphs. Add missing cairo_surface_destroy and tidy up offset calculations as suggested by Owen. Simplify code for computing the extents of clipping area, by introducing a couple of cairo_rectangle_t functions.
* The overall idea of this rewrite is that we want to pass the source pattern ↵Kristian Høgsberg2005-01-271-34/+45
| | | | | | | | | | | | | | all the way down into the backends. The motivation for this is that not all backends want a surface for the source operand, and by passing the pattern down, backends can choose to convert it to a surface if they need that. The patch removes the create_surface function pointer from the surface vtable and moves much of that code into a couple of helper functions. The composite, compsite_trapezoids, and show_glyphs backend functions are updated to take a cairo_pattern_t instead of a surface as the source. Change these functions to not create a surface for the pattern and just pass the pattern down to the backend functions. New function to translate a set of trapezoids. Break out the code to adjust and restore surface transformation and repeat settings into _cairo_pattern_prepare_surface and _cairo_pattern_restore_surface. Split cairo_pattern_create_for_surface into an init function and a create function. Utility functions to create a surface from a pattern. Update these backends to work with the new pattern API. Glitz work by David Reveman. Update these to pass through the new set of args. Update this reference image as we now render it correctly.
* Change return value from cairo_status_t to cairo_int_status_t to match ↵Carl Worth2004-12-201-1/+1
| | | | definition in cairo_surface_backend_t.
* Change the signs of a variety of metrics, which were backwards.Graydon Hoare2004-11-051-2/+2
| | | | | 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.
* Convert all files to utf-8. Add copyright information to cairo_png_surface.c.Carl Worth2004-10-211-1/+1
|
* Add cairo_cache.cGraydon Hoare2004-10-081-1/+2
| | | | | | | | | | | | | | | 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.
* Add the MPL as a new license option, in addition to the LGPL.Carl Worth2004-09-041-10/+27
|
* Make a copy of the region since pixman is currently taking ownership of it ↵Carl Worth2004-08-141-1/+14
| | | | (ugh). Thanks to Vladimir Vukicevic <vladimir@pobox.com> and Peter Dennis Bartok <peter@novonyx.com>.
* Fix to explicitly refer to GNU Lesser Public License 2.1 rather than the ↵Carl Worth2004-08-021-7/+5
| | | | Library Public License version 2 or 'any later version'
* Change from MIT license to LGPL.Carl Worth2004-08-021-20/+14
|
* Added glyph cachingDavid Reveman2004-05-241-0/+1
|
* Track pixman fixes to PIXMAN_FORMAT_NAME_*.Carl Worth2004-04-161-2/+2
| | | | | | Explicitly add cases for all enum values to eliminate compiler warnings. Remove proposal for surface_clip interface as cairo_clip should be able to cover this case now. Added bug concerning negative ref_counts.
* Added new pattern APIDavid Reveman2004-04-061-1/+22
|
* Add question on semantics with empty region. Fix missing return value.Carl Worth2004-03-301-4/+13
| | | | | Export for internal use. (_cairo_image_abstract_surface_set_clip_region): Add silly wrapper to match the backend interface. Remove unused variables.
* Add.Graydon Hoare2004-03-191-1/+11
| | | | | | | | | finalize and copy clip.region. Detect rectangular clips and push down to backend. Add set_clip_region slot. (cairo_clip_rec_t): Add region slot. (_cairo_gstate_init_clip) (_cairo_surface_set_clip_region): Prototype. Add. Add. Add. not implemented.
* Rename surface->ic_image to surface->pixman_image.Carl Worth2003-12-111-80/+80
| | | | | Rename functions and indentifiers with ic_ in the name that were missed by the recent renaming. Fix indentation problems left by the recent renaming. Shift everything over from libic/libpixregion/slim to libpixman. Many thanks to Dave Beckett <dave.beckett@bristol.ac.uk> for all of the heavy lifting with this renaming effort.
* Directly fold in slim stuff rather than depending on it from an external ↵Carl Worth2003-12-111-60/+60
| | | | | | | | package. Switch from libic to libpixman. Include pixman.h not ic.h. (__external_linkage): Directly fold in slim stuff rather than depending on it from an external package. Look for libpixman instead of libic and slim.
* Add comment pondering memory management semantics of ↵Carl Worth2003-11-061-1/+3
| | | | | | | cairo_current_target_surface. NULL out pen->vertices after free. NULL out durface->data after free.
* Add support for cairo_copy_page. Fixes so PS output can be more than one ↵Carl Worth2003-11-031-0/+7
| | | | page. Bump version to 0.1.11 for new cairo_copy_page.
* Add several missing checks for out of memoryCarl Worth2003-11-031-6/+20
|
* Implemented preliminary PostScript output support. Added cairo_show_page. ↵Carl Worth2003-10-311-2/+16
| | | | Bumped version number to 0.1.10
* Moved all libic-related drawing into cairo_image_surface.cCarl Worth2003-10-311-0/+429