Commit graph

384 commits

Author SHA1 Message Date
Owen Taylor
e66e4c7b8c src/cairo.h src/cairo_surface.c src/cairo-xlib.h src/cairo_xlib_surface.c: Move cairo_xlib_surface_set_device_offset() to a generic cairo_surface_set_device_offset().
Take the surface's device offset into account.
Update.
2005-03-17 12:57:42 +00:00
Owen Taylor
0b09748296 Fix the docs to to correctly describe the order of transformation for muliply/scale/rotate/translate. (cairo_matrix_translate): Fix translate/rotate typo in the parameter descriptions. 2005-03-17 11:24:00 +00:00
Kristian Høgsberg
b481b85841 ChangeLog 2005-03-17 07:30:05 +00:00
Kristian Høgsberg
0f52fb2289 Dont call user data destroy function if it's NULL.
Add test case for user data with NULL destroy function.
2005-03-16 12:15:29 +00:00
Kristian Høgsberg
6993c086eb Add cairo_output_stream.c
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.
2005-03-16 12:08:41 +00:00
Owen Taylor
5fecf69e2c src/cairo-xlib.h src/cairo_xlib_surface.c: Rework set of contructors for XLib surfaces. Add cairo_xlib_surface_set_size().
src/cairo-xlib.h src/cairo_xlib_surface.c: Add cairo_xlib_surface_set_device_offset().
Rewrite for clarity and efficiency.
Use a temporary pixmap to avoid possible BadMatch when fetch from windows.
src/cairo.[ch] src/cairo-xlib.h: Fix some parameter names for the docs.
Update
2005-03-15 16:25:30 +00:00
Carl Worth
a98430092f Added some documentation, so we get some churn here.
New functions: cairo_copy_path_data, cairo_copy_path_data_flat, and cairo_append_path_data.
Add new implementation for cairo_copy_path_data and cairo_append_path_data.
New test for new path_data functions.
2005-03-11 14:29:15 +00:00
Kristian Høgsberg
1f5394ffe9 *** empty log message *** 2005-03-10 09:28:50 +00:00
Carl Worth
c67ba13a6e Originally: 2005-02-24 Carl Worth <cworth@cworth.org>
Add const qualifier to cairo_user_data_key_t arguments.
Originally: 2005-02-15 Kristian Høgsberg <krh@redhat.com>
Add these two functions to set and get user data on an surface.
Function prototypes for new functions.
Test case for user data functions.
2005-03-10 08:59:11 +00:00
Carl Worth
6d4653fe22 Rename all the cairo_current functions to cairo_get functions instead. Add documentation for all of these functions (and a few others as well).
Add support so that old binarys should still run and old source should still compile, (though we'll rip that out again on the API Shakeup flag day).
2005-03-09 12:35:36 +00:00
Kristian Høgsberg
74416f2d9a Return CAIRO_STATUS_SUCCESS even if we don't implement masks yet, so we don't set cr->status to CAIRO_INT_STATUS_UNSUPPORTED. 2005-03-07 21:22:42 +00:00
Carl Worth
c4697bc572 Disable the "new" intersection code so that the incorrect fill problems (test/fill_rule) go away. 2005-03-07 14:23:07 +00:00
Owen Taylor
e7607bb379 Comment and clean up the gradient computation. (_cairo_linear_pattern_classify): Determine if a linear gradient is horizontal or vertical. (_cairo_pattern_acquire_surface_for_gradient): Optimize horizontal/vertical gradients with a repeating surface.
Test case for linear gradients at angles and with a rotated pattern matrix.
2005-03-06 12:05:23 +00:00
David Reveman
023d911232 Fix gradient acceleration in glitz backend 2005-03-06 05:16:19 +00:00
Owen Taylor
50b483042d src/cairo_win32_font.c src/cairo_win32_surface.c: Update for recent backend interface changes.
Reenable win32 backend by default.
2005-03-04 10:43:24 +00:00
Carl Worth
f6dcd38c8c Fix accidental reversal of condition in previous patch. 2005-03-04 10:07:22 +00:00
Owen Taylor
66af5f9f36 src/cairoint.h src/cairo_pattern.c src/cairo_glitz_surface.c: Add _cairo_pattern_is_opaque, use it rather than pattern->alpha == 1.0. 2005-03-04 09:41:34 +00:00
David Reveman
4552898cfb Update xcb backend 2005-03-03 20:16:23 +00:00
David Reveman
378fb57051 Add more mask surface acceleration to glitz backend 2005-03-03 18:55:28 +00:00
David Reveman
01b87c7d99 Add overall alpha acceleration using mask surface 2005-03-03 18:46:49 +00:00
David Reveman
50b5344d7d Pass mask to composite operation as pattern 2005-03-03 18:39:06 +00:00
David Reveman
a97f4cce5e Removed surface backend functions set_matrix, set_filter and set_repeat 2005-03-03 18:20:28 +00:00
David Reveman
36b69fc7f4 Major update to glitz backend 2005-03-03 18:04:51 +00:00
David Reveman
019d381b40 Change to cairo_surface_t like structure of of cairo_pattern_t 2005-03-03 17:40:04 +00:00
Carl Worth
06bed80b9e Fix uninitialized value for status, (reported by Manish Singh). 2005-03-01 14:50:57 +00:00
Kristian Høgsberg
85db25b8a1 Fix this function again. Problem with signed/unsigned types reported by Jeff Muizelaar <jrmuizel@nit.ca>. 2005-02-27 11:21:39 +00:00
Kristian Høgsberg
db2eb5d4cb Remove newline in comment which was confusing gtk-doc.
Document these functions.
2005-02-27 11:02:48 +00:00
Carl Worth
f343b0b44a From David Reveman:
Rewrite to use cairo_bool_t for legibility.
2005-02-25 13:31:00 +00:00
Carl Worth
ebec6df7a7 From David Reveman:
Simplify code to eliminate a goto.
2005-02-25 13:03:42 +00:00
Carl Worth
03e7e13cb1 From David Reveman:
Clean up the mess that was the misnamed _cairo_gstate_create_pattern.
2005-02-25 12:58:49 +00:00
Carl Worth
1a043bbf26 Don't put an off-by-one n_stops into cairo_shader_op_t. (_cairo_shader_op_find_color_stops): Put search for two color stops containing a given offset into its own function. Handle the case of before first and after last stop by returning the nearest stop twice. (_cairo_pattern_calc_color_at_pixel): Handle case of no color stops by returning a transparent pixel. 2005-02-25 12:52:47 +00:00
Owen Taylor
8ad3ab22e4 Remove a left-over debug printf. 2005-02-24 15:48:07 +00:00
Carl Worth
aca0708fc8 Fix memory leak when realloc fails due to out-of-memory. 2005-02-24 14:06:03 +00:00
Owen Taylor
a64b7e51ee Instead of counting on ordering deletion to work (apparently it didn't on older Windows), save the initial bitmap created with the DC and reselect that into the DC. (Based on a patch by Hans Breuer) 2005-02-24 12:51:33 +00:00
Carl Worth
04fefd1b28 Fixes from David Reveman with minor cleanups by Carl Worth:
Handle new failure possibility of _cairo_gstate_init. (_cairo_gstate_init): Handle possible failure of _cairo_pattern_create_solid. (_cairo_gstate_set_pattern): Reference new pattern before destroying existing pattern to handle the case where they are the same. (_cairo_gstate_set_rgb_color): Handle possible failure of _cairo_pattern_create_solid.
2005-02-24 12:28:51 +00:00
Carl Worth
12d19423f6 Fix typo (pointed out by Kristian Høgsberg). 2005-02-24 10:09:44 +00:00
Owen Taylor
724cf1ce71 When we created a DC/bitmap pair, delete the DC before the Bitmap so that the Bitmap will be released from the DC and can be destroyed. (Reported by Hans Breuer)
configure.in cairo.pc.in: Only require fontconfig if building FreeType font backend.
Fix output when reporting Win32 font backend.
2005-02-24 08:20:14 +00:00
Carl Worth
77826a9756 Fix typo (pointed out by Mike Emmel) 2005-02-24 07:39:20 +00:00
Carl Worth
dcfb0d8a2b Switch from broken cworth@isi.edu address to canonical cworth@cworth.org address. 2005-02-22 11:35:03 +00:00
Carl Worth
604e333be2 Convert to utf-8 encoding. 2005-02-22 11:32:02 +00:00
Carl Worth
30a02c8e17 Revert accidental commit. 2005-02-21 08:22:47 +00:00
Carl Worth
c8a98b109a Fix y offset to use dst_y instead of dst_x, (caught by David Reveman). 2005-02-21 08:17:42 +00:00
Owen Taylor
81fd7e53e3 Fix line endings (reported by Hans Breuer) 2005-02-20 18:19:10 +00:00
Kristian Høgsberg
d106bb2f3c Patches from Mike Owens <etc@filespanker.com>:
Free rows if we fail early in this function.
Clean up path if we run out of memory.
2005-02-16 09:34:47 +00:00
Kristian Høgsberg
9597c0b791 Initialize array element size correctly. 2005-02-13 20:36:28 +00:00
Kristian Høgsberg
0502a5a63c Patches from Owen Taylor:
Emit text as octal escapes, to avoid problems with \, \r, ), etc. (_cairo_pdf_document_write_fonts): Change /Flags to be 4 (symbolic), not 32 (non-symbolic), otherwise acroread gets confuse. (cairo_pdf_ft_font_write_cmap_table): Use a 1,0 cmap subtable, not a 0,0, to conform to the PDF spec.
2005-02-13 12:41:42 +00:00
Owen Taylor
d4ae84f397 Fix x2/x1 typo. 2005-02-12 18:23:04 +00:00
Carl Worth
f3f63f3924 Return all-zero extents if string is NULL. 2005-02-12 13:01:39 +00:00
Kristian Høgsberg
b33f37ff04 Make clipping fast path fast. When we have a clipping region set, intersect it against the drawing extents to determine the bounding box for the visible drawing. 2005-02-12 12:59:53 +00:00
Owen Taylor
67ffc273ef src/cairo_gstate.c src/cairo.c: Allow cairo_set_font (cr, NULL) to unset the current font and return the cairo_t to the the "use the font from cairo_select_font() state". 2005-02-06 15:07:17 +00:00