summaryrefslogtreecommitdiff
path: root/src/cairo.h
AgeCommit message (Collapse)AuthorFilesLines
2005-08-23Minor doc edit.Carl Worth1-1/+1
2005-08-23Update the long description of cairo_matrix_t to match the current sources.Billy Biggs1-45/+47
Add cairo_path_data_t. Some documentation updates and improvements.
2005-08-23Move CAIRO_CONTENT_VALID and CAIRO_FORMAT_VALID from the public cairo.h to ↵Carl Worth1-9/+0
the private cairoint.h where they belong.
2005-08-19Fix for bug #2729:Carl Worth1-2/+7
Adjust negative offsets up to their equivalent positive value. Add error checking for dash values, (must each be non-negative and must not be all zero). Add documentation. Add new CAIRO_STATUS_INVALID_DASH. Add dash-offfset-negative test from Owen. churn
2005-08-10Augment existing CAIRO_VERSION_MAJOR/MINOR/MICRO and CAIRO_VERSION_STRING ↵Carl Worth1-0/+16
with CAIRO_VERSION_ENCODE and CAIRO_VERSION. Add functions for run-time access: cairo_version cairo_version_string
2005-08-08Add a new API for disabling antialiasing of shapes drawn by cairo. This is a ↵Billy Biggs1-20/+26
hint and is not supported by all backends. Store the antialiasing mode in the gstate and pass it to the backend for trapezoid rendering and for clipping. Pass the antialiasing parameter down to the backend where appropriate. Pass the antialiasing parameter down to the backend where appropriate. Add support for A1 format trapezoid rendering, and remove the _create_mask_image function, creating a temporary image from memory we allocate and clear. Support A1 masks to disable antialiasing using the RENDER extension when requested. Support A1 masks to disable antialiasing using the RENDER extension when requested. Blindly pass through the antialising parameter. Add the antialiasing parameter but don't support it. Add a test case and a reference image from the latest libpixman. Add the new antialiasing disabling API to the docs. Update progress on a parameter to disable antialiasing. reviewed by: cworth, otaylor
2005-08-04Change *_reference() functions to return the object being referenced.Kristian Høgsberg1-5/+5
2005-08-01New public header file.Carl Worth1-8/+0
New function to reset all static data (eg. caches) to their initial state. Fix check-valgrind target to depend on the 'all' target. Add check for a new, proposed, XrmFinalize function. Add cairo-debug.c. Move the definition of CAIRO_BEGIN_DECLS to cairo-features.h so that it can be shared between public header files, and so that it doesn't clutter cairo.h Implement reset_static_data in all modules as required. Call cairo_debug_reset_static_data and FcFini so that we can have all tests be valgrind-clean with respect to memory leaks and still-reachable data.
2005-08-01src/cairo.h src/cairoint.h src/cairo-surface.c: Add ↵Owen Taylor1-0/+13
cairo_mark_dirty[_rectangle]() and cairo_flush() for Implement a cairo_flush() that restores the original clip. Also restore the original flush when a surface is finished. Check off the item.
2005-07-28Fix so that one of three different error status values will be returned:Carl Worth1-1/+3
CAIRO_STATUS_NO_MEMORY CAIRO_STATUS_FILE_NOT_FOUND CAIRO_STATUS_READ_ERROR Add new CAIRO_STATUS_FILE_NOT_FOUND. Add new _cairo_surface_nil_read_error and _cairo_surface_nil_file_not_found. Test the new FILE_NOT_FOUND error.
2005-07-28src/cairo-font.c src/cairoint.h: Define _cairo_font_face_nil. ↵Owen Taylor1-0/+3
(cairo_font_face_reference, cairo_font_face_destroy cairo_font_face_set_user_data): Handle a nil font face. (cairo_font_face_status): New function. src/cairo-ft-font.c (cairo_ft_font_face_create_for_pattern): src/cairo-ft-font.c (cairo_ft_font_face_create_for_ft_face): src/cairo-win32-font.c (cairo_win32_font_face_create_for_logfontw): Return _cairo_font_face_nil on out-of-memory. Check return of _cairo_simple_font_face_create(). Error out if font_face has a status. Handle a nil surface.
2005-07-27Add CAIRO_STATUS_INVALID_CONTENT, CAIRO_STATUS_INVALID_FORMAT, and ↵Carl Worth1-1/+13
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-25src/cairo.[ch] src/cairo-gstate-private.h src/cairo-gstate.c src/cairoint.c: ↵Owen Taylor1-0/+8
Add cairo_{get,set}_font_options(). Add cairo-xlib-private.h Update reviewed by: cworth
2005-07-23Slight change to previous commit based on feedback from cworth.Malcolm Tredinnick1-7/+12
2005-07-23Add some missing parameters for API docs.Malcolm Tredinnick1-6/+27
2005-07-21src/cairo-font-options.c src/cairo.h src/cairoint.h src/Makefile.am: Add an ↵Owen Taylor1-4/+150
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-20Fix macro to not consider CAIRO_FORMAT_ARGB32 (==0) as a valid cairo_content_t.Carl Worth1-3/+5
2005-07-08Give enum tags an underscore prefix to match the style of the struct tags. ↵Carl Worth1-39/+64
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-06Remove CAIRO_STATUS_NO_TARGET_SURFAC and add CAIRO_STATUS_INVALID_STATUS.Carl Worth1-13/+14
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-06-28New functions to create a cairo_pattern_t corresponding to a solid color and ↵Kristian Høgsberg1-0/+8
a translucent color respectively. Document a few pattern functions.
2005-06-20Rip out cairo_set_error_notfiy function as it is clear that it is not the ↵Carl Worth1-14/+0
right approach. Remove error-notify test.
2005-06-16Reorder fields of cairo_private_t to match initialization order.Carl Worth1-0/+14
Call error_notify callback if set. (cairo_create): Initialize error_notify callback to NULL. (cairo_set_error_notify): New function to allow the user to set an error notify callback. New cairo_set_error_notify prototye. New test for cairo_set_error_notify.
2005-06-15Remove cairo_status_string function which can now be replaced by:Carl Worth1-4/+2
cairo_status_to_string (cairo_status (cr)); This allows consistent handling of status values for things like cairo_pattern_status where there is now cairo_pattern_status_string function.
2005-06-14Remove comment suggesting ambiguity of whether cairo_get_target references ↵Carl Worth1-2/+0
the surface, (we decided as part of the API shakeup that cairo functions returning pointers to internal objects do not automatically take a reference).
2005-06-13No longer need to check for NULL after creating a pattern.Carl Worth1-6/+10
Propagate status errors from pattern->status to cr->status. Originally 2005-05-08 Owen Taylor <otaylor@redhat.com>: src/cairo-pattern.c src/cairoint.h: If allocation of pattern objects fails, return special static nil pattern objects. If adding a color stop fails to allocate memory, set pattern->status. (And fix a memory leak.) Make public functions return when pattern->status is set, (and no longer return a cairo_status_t). src/cairo-pattern.c src/cairo.h doc/public/cairo-sections.txt: Add cairo_pattern_status() Check the status of gstate->source and of mask patterns passed in.
2005-06-13Originally 2005-06-02 Carl Worth <cworth@cworth.org>:Carl Worth1-0/+1
Add a status field to cairo_path_t. Add documentation for the new approach for handling errors in these functions---always returning a valid pointer with at least a status. (cairo_append_path): Propagate path status errors to the context. Add note to documentation on initializing path->status. Add missing cairo_private qualifier to a couple functions. Track new status field in cairo_path_t. (cairo_path_destroy): Don't destroy cairo_path_nil. Add documentation. (_cairo_path_data_create): (_cairo_path_data_create_flat): (_cairo_path_data_append_to_context): Add documentation. (_cairo_path_data_create_in_error): New function to create a placeholder cairo_path_t just to propagate a cairo_status_t error.
2005-06-10Pull the enum out from inside cairo_path_data_t and give it a name of ↵Carl Worth1-6/+8
cairo_path_data_type_t. This allows C++ programs to see the enum values. It also allows variables to be declared of this type for manually constructing a cairo_path_t.
2005-06-09Remove trailing comma from enum values which gcc 4.0 does not want to see ↵Carl Worth1-1/+1
(Luis Villa). Closes bug #3502.
2005-05-31Add new function cairo_status_to_string an reimplement cairo_status_string ↵Carl Worth1-0/+3
in terms of the new function.
2005-05-26Replace nesting-only surface clipping with gstate contained serial-number ↵Keith Packard1-6/+1
tracked clipping sets that are loaded into the surface on demand just before each rendering operation. This permits multiple cairo_t contexts to reference a surface without regard to ordering of operations among the contexts. Also in this patch is a change to the xlib surface that creates two separate Pictures, one for source and one for destination operands which separates the source clipping from destination clipping. Cairo now specifies that sources are never clipped by any clipping applied to them as destinations. Move cairo_clip_t (renamed from cairo_clip_rec_t) from cairoint.h to cairo-gstate-private.h. Eliminate stack of clip state from surfaces. Add new surface clipping API. Manage clip objects entirely within the gstate, loading the whole thing into the surface just before drawing. Source surfaces need not have clipping modified as the surface interface now specifies that source surfaces are always unclipped. Eliminate nested clipping contexts, leaving clip management entirely to the gstate. Create new clip API for the gstate which uses per-surface serial numbers to match gstate clipping against current surface clipping values. Surfaces no longer track clipping regions at all, so the old _cairo_surface_get_clip_extents has been replaced with _cairo_surface_get_extents. For PDF/PS surfaces, this function is expected to return a rectangle covering the entire fixed point coordinate space to leave rendering unclipped by the surface. Region clipping capability is now signalled by a non-NULL function pointer in set_clip_region. Each surface now contains two Pictures, one for source and one for destination operands so that source operands are never clipped by destination clipping. CAIRO_STATUS_BAD_NESTING removed self-copy now passes (Xlib only, until libpixman changes land) reviewed by: krh, otaylor, cworth
2005-05-17Fix more deprecation macrosCarl Worth1-4/+4
2005-05-17Add a few more REPLACED_BY and DEPRECATED_BY definitions.Carl Worth1-1/+16
Add some helpful warnings.
2005-05-10Fix cairo_get_font_matrix to actually use its out-parameter. And change the ↵Carl Worth1-2/+3
return type to void.
2005-05-09Fix deprecation macro to point to the right function, (thanks to John Ellson).Carl Worth1-1/+1
2005-05-09Push cairo_matrix_t const-correctness down through the entire implmentation, ↵Carl Worth1-13/+17
(expanding on preliminary work by Robert O'Callahan <rocallahan@novell.com>)
2005-05-06Point to both cairo_set_source_rgba and cairo_paint_with_alpha in ↵Carl Worth1-1/+1
deprecation of cairo_set_alpha.
2005-05-06Change definitions of everything in cairo-features.h to prefer #if over #ifdef.Carl Worth1-2/+2
Track #ifdef -> #if changes. Add support to automatically change all #ifdef CAIRO_HAS to #if CAIRO_HAS.
2005-05-06Remove deprecated cairo_get_rgb_color that was accidentally missed in the ↵Carl Worth1-3/+0
recent purge of deprecated functions.
2005-05-06Eliminate the following deprecated functions from cairo's interface:Carl Worth1-189/+76
cairo_copy cairo_get_path cairo_get_path_flat cairo_matrix_create cairo_matrix_destroy cairo_matrix_copy cairo_matrix_get_affine cairo_surface_set_repeat cairo_surface_set_matrix cairo_surface_get_matrix cairo_surface_set_filter cairo_surface_get_filter Also, eliminate all support for compiling against, or running with old, deprecated names for functions. Deal with all of the removals.
2005-05-06Rename and re-order the cairo_operator_t enum to names that abbreviate less ↵Carl Worth1-7/+10
and are easier to understand, (eg. CAIRO_OPERATOR_DEST_OVER instead of CAIRO_OPEERATOR_OVER_REVERSE).
2005-05-06Remove cairo_set_target_surface and all other backend-specific ↵Carl Worth1-53/+33
cairo_set_target functions. Require a cairo_surface_t* to call cairo_create. Port to use new cairo_create interface. Rewrite all tests that were using cairo_set_target_surface to instead create a temporary cairo_t, (eventually to be replaced with cairo_begin_group).
2005-05-06src/cairo.[ch] doc/public/cairo-sections.txt: Add cairo_paint_with_alpha().Owen Taylor1-0/+4
Fix segfault when mask == NULL. test/mask.c test/mask-ref.png: Add testing of cairo_paint_with_alpha(). test/coverage.c test/coverage-ref.png: Remove ... it's not testing anything that mask doesn't test better.
2005-05-03Originally 2005-04-20 Carl Worth <cworth@cworth.org>Carl Worth1-14/+6
Remove cairo_show_surface. Add new cairo_set_source_surface. Remove _cairo_gstate_show_surface. Replace calls to cairo_show_surface with cairo_set_source_surface; cairo_paint. Fix messages to prefer - over _. Fix documentation. Three new tests to exercise set_source_surface more completely, (two of these are expected failures dues to outstanding bugs).
2005-05-02Changes the sign of extents->descent to match win32 backend and the ↵Owen Taylor1-3/+44
conventional convention. Document cairo_font_extents_t.
2005-05-02src/cairo-surface.c src/cairoint.h: Add _cairo_surface_begin/end to save and ↵Owen Taylor1-1/+28
restore the clip state of a surface. Copy and store clip regions set on a surface so that we can save and restore them. Add a CAIRO_STATUS_BAD_NESTING error for interleaved use of two cairo_t's on the same surface. Also, add a skeleton doc comment for cairo_status_t. src/cairo.c src/cairo-gstate.c src/cairoint.h: Use _cairo_surface_begin/end to replace _cairo_gstate_restore_external_state. Use _cairo_surface_begin/end to save the state of a surface when we start drawing at it and restore it at the end. Check that the save level of the surface is what we expect on drawing operations and fail with CAIRO_STATUS_BAD_NESTING otherwise. src/cairo-pattern.c src/cairoint.h (_cairo_pattern_acquire_surface_for_surface) (_cairo_pattern_release_surface): Surround use of pattern->surface with _cairo_surface->begin/end so we don't clip surfaces used as sources. test/clip-nesting.c test/Makefile.am: Test of destinatin clipping with the nested creation of cairo_t's for the same context. test/source-clip.c test/Makefile.am: Test that clipping on a source as a destination doesn't affect use of it as a source. XFAIL test for copying from a surface as a source to itself as a destination with a clip.
2005-05-02src/cairo.[ch] src/cairo-gstate.c: Add cairo_mask() and cairo_mask_surface().Owen Taylor1-0/+10
test/maks.c tests/Makefile.am tests/mask-ref.png: Add a comprehensive tests for cairo_mask(). Updated
2005-04-26Updated.Owen Taylor1-1/+1
src/cairo-png.c src/cairo.h: Fix up some doc build issues.
2005-04-26Originally: 2005-04-19 Carl Worth <cworth@cworth.org>Carl Worth1-1/+9
Add cairo_stroke_preserve, cairo_fill_preserve, and cairo_clip_preserve. Rip the path out of cairo_gstate_t. Add path to cairo_t. Bring in most of the path code that used to live in cairo-gstate.c Move arc generation code into its own file. Accept path+ctm_inverse+tolerance instead of gstate. Absorb flattening and device space->user space conversion that used to be in _cairo_gstate_intepret_path. Prefer cairo_fixed_t parameters over ciaro_point_t for cross-file interfaces. Track changes in _cairo_path_fixed interfaces. Port to use cairo_fill_preserve rather than cairo_save/cairo_restore which no longer work for saving the path. Remove get and set of current point since it is no longer affected by cairo_save and cairo_restore. Add get and set testing for cairo_matrix_t.
2005-04-25Renamed from cairo_surface_write_png_to_stream() for consistency. ↵Kristian Høgsberg1-3/+3
(cairo_surface_write_to_png): Renamed from cairo_surface_write_png() for consistency.
2005-04-25Factor out bulk of the code into a new callback based function, write_png(). ↵Kristian Høgsberg1-16/+52
Call it with a stdio write callback. (cairo_surface_write_png_to_stream): New function to write a surface to a PNG stream. (cairo_image_surface_create_from_png): Likewise, move most of the code to read_png(), clean up error handling and reduce this function to calling read_png() with a stdio based read function. (cairo_image_surface_create_from_png_stream): New function to create an image surface from a PNG stream. New functions to get widht and height of an image surface. Add new prototype and error codes. Adjust to new PNG API.