Commit graph

1065 commits

Author SHA1 Message Date
Carl Worth
79eee2c303 Don't export cairo_image_surface_set_clip_region.
Eliminate some unnecessary _cairo_image_abstract_surface variations of backend function.
Remove errant include of cairo-pdf.h.
2005-12-16 11:21:24 +00:00
Christian Biesinger
6ba7772138 Globally rename "operator" to "op", to allow writing backends in C++
reviewed by: cworth
2005-12-16 03:02:35 +00:00
Carl Worth
9becae35c0 Remove dead code from cairo-meta-surface: vestiges of meta-surface backend implementations of composite, fill_rectangles, composite_trapezoids, set_clip_region, and old_show_glyphs. 2005-12-14 16:45:39 +00:00
Carl Worth
77540a2dfa Add preliminary support for --enable-gcov. Thanks to Pierre-Alain Joye (with inspiration from the PHP gcov support by Jani Taskinen and Ilia Alshanetsky).
Ignore *.gcda and *.gcno gcov data files.
2005-12-14 16:22:06 +00:00
Carl Worth
bb418ab4e5 Make creator be cairo, not Cairo. 2005-12-13 16:31:14 +00:00
Vladimir Vukicevic
c2c4f0bb25 bump glitz req to 0.5.1, test for backends
Add glitz backend (original patches from sunmoon1997@gmail.com), including glx, wgl, and agl support. Add CAIRO_TEST_TARGET environment variable for limiting backends to test.
Takes all *.log files and spits out html to stdout that can be used to view all test results at once.
2005-12-12 11:56:40 +00:00
Emmanuel Pacaud
b2f973e7f4 add optionnal disabled by default SVG backend.
include SVG backend files.
include SVG_SURFACE_FEATURE.
rename dtostr to _cairo_dtostr for use in cairo-svg-surface.c.
_cairo_dtostr declaration.
new.
new.
build svg-surface and svg-clip.
new.
new.
2005-12-08 13:09:26 +00:00
Carl Worth
964c56e72b Note that self-copy now works with the PS backend.
Add _cairo_array_init_snapshot and checks for is_snapshot throughout.
Add a new surface->backend->snapshot function.
Implement _cairo_meta_surface_snapshot and _cairo_meta_surface_acquire/release_source_image. Change _cairo_meta_surface_create to require the width and height in pixels to be used when replaying for purposed of _cairo_meta_surface_aquire_source_image.
Track change in prototype of _cairo_meta_surface_create. Implement _cairo_ps_surface_snapshot by deferring down into _cairo_meta_surface_snapshot.
2005-12-07 12:19:10 +00:00
David Reveman
4484830d6c glitz backend gradient fix 2005-12-05 08:33:04 +00:00
David Reveman
57fe792019 More updates to track latest changes to glitz 2005-12-04 07:47:44 +00:00
David Reveman
2802950123 Track changes to glitz 2005-11-29 15:48:34 +00:00
Carl Worth
674ed1932e Add reminder to fix all memory leaks (as determined by the test suite) before release 1.2.0.
Patch leak of patterns as noted in bug #5100 (thanks to Richard Stellingwerff <remenic@gmail.com>).
2005-11-21 10:50:20 +00:00
Anders Carlsson
a16d93f367 If the surface is flipped, flip the CG coordinate system before drawing the images.
(cairo_quartz_surface_create):
Add "flipped" argument to cairo_quartz_surface_create.
2005-11-14 12:57:31 +00:00
Carl Worth
5b6c912667 Note that PS is now passing all tests except for self-copy.
Add missing glue to hook up PS backend with new meta-surface support for the 5 basic drawing operations. Currently, this forces image fallbacks for all operations.
Switch from gs device of pngalpha to png16m which for some reason gives the correct result for nil-surface now, while pngalpha does not.
Key off of N_OPERATORS as the loop control for easier trimming down of this test case when debugging.
Rename stroke_style parameter to style in backend->stroke parameter list.
Remove PS-specific reference images for many tests which are now using more fallback paths than before.
2005-11-08 17:43:13 +00:00
Carl Worth
48218fec48 Add support to cairo_meta_surface for the 5 basic drawing operations. Remove _cairo_meta_surface_get_extents and _cairo_meta_surface_old_show_glyphs.
Remove size for _cairo_meta_surface_create. It is no longer needed now that get_extents is not a required backend function.
Track change in cairo_meta_surface_create no longer requiring a size
Qualify the glyphs argument to backend->show_glyphs as const.
Whitespace style cleanup.
2005-11-08 17:16:21 +00:00
Carl Worth
632b948c8c Add new _cairo_array_allocate function for growing the array and getting a pointer to the buffer of new data. This is intended to be used in place of the abuse of passing data=NULL to _cairo_array_append_multiple.
Add new function to be used instead of the abuse of pasing data=NULL to cairo_pdf_ft_font_write.
Just return a status now instead of a pointer to the written buffer, since cairo_pdf_ft_font_allocate_write_buffer should now be used instead when a pointer is needed.
Switch to use cairo_pdf_ft_font_allocate_write_buffer.
Fix use of uninitialized status value.
initialization just to keep the compiler quiet about possibly uninitialized variables.
2005-11-07 13:23:31 +00:00
Carl Worth
3930b6ab77 Use field-by-field copying rather than whole structure copying. This avoids the hidden copies being overlooked in future code modifications. 2005-11-07 10:50:39 +00:00
Carl Worth
9cf7fafffc Fix to copy region if NULL. 2005-11-07 10:48:01 +00:00
Carl Worth
80e4c6307d Reorder function bodies to match the order of fields in the structure definition. Some style cleanups.
Fix bug in that several fields were not being copied.
2005-11-07 10:46:23 +00:00
Carl Worth
8d09247fcd Two more instances of copy-and-reference in a single step. 2005-11-07 10:29:37 +00:00
Carl Worth
66e69f18ec Perform copy and reference in a single step.
Remove unnecessary checks for NULL before _destroy() functions. Reset pointers to NULL after _destroy().
2005-11-07 10:26:18 +00:00
Carl Worth
36523b9656 Reorder function bodies to match to match the order of the fields in the structure definition. 2005-11-07 10:17:37 +00:00
Carl Worth
9796a54fa1 Style fix: test-and-bail rather than making the working body conditional.
Allow destroy to work on a NULL object.
2005-11-07 10:02:06 +00:00
Carl Worth
201d4e2ce7 Add functions to initialize and copy cairo_stroke_style_t objects.
Use new _cairo_stroke_style functions rather than direct modification.
Add missing prototype for _cairo_font_options_init_copy.
2005-11-07 09:49:51 +00:00
Carl Worth
a9e2cf8d9b Remove unused prototypes for _cairo_gstate_begin_group and _cairo_gstate_end_group. 2005-11-07 09:33:38 +00:00
Carl Worth
ed160b63a1 Add documentation for _cairo_gstate_create, _cairo_gstate_init_copy, and _cairo_gstate_clone. 2005-11-07 09:30:38 +00:00
Carl Worth
fe324c4415 Add a function for copying font options rather than just using direct structure copying. 2005-11-07 09:26:47 +00:00
Carl Worth
f79d48640f Add missing declarations for status variables. Thanks to Mikael Hallendal for pointing this out. 2005-11-05 22:43:06 +00:00
Carl Worth
9341c254a0 Rename old, rarely used _cairo_array_append to _cairo_array_append_multiple. Add much more common _cairo_array_append. Fix both to return a cairo_status_t. Remove undocumented code to allow a non-copying append when elements is NULL, (let's not encourage unintialized data, shall we?)
Cleanup to not rely on undocumented copy-avoidance in _cairo_array_append.
Track change in number of arguments and return value of _cairo_array_append.
2005-11-04 16:13:30 +00:00
Carl Worth
feef096e25 Add documentation for all _cairo_array interface functions. 2005-11-04 15:15:30 +00:00
Carl Worth
39eca22bfe Rework support in the surface backend for the five basic drawing operations (paint, mask, stroke, fill, and show_glyphs). Now, all 5 operations have backend functions, and all use a consistent convention for argument naming and ordering. The old fill_path has been replaced with a new fill. The old show_glyphs function was recently renamed to old_show_glyphs and has not yet been ported to the new show_glyphs, (so all backends have a NULL show_glyphs function). In fact, of the 5 new backend functions, fill is the only one that has an implementation in any backend. As part of this cleanup a new cairo_stroke_style_t object is introduced to capture the many settings unique to the stroke operation, (line_width, line_cap, line_join, miter_limit, dash, num_dashes, and dash_offset).
Track changes in surface backend from fill_path to fill.
Track the new canonical argument naming and ordering for the 5 drawing operations.
Move various stroke style settings into new cairo_stroke_style_t.
Drop NULL fill_path backend function which no longer exists.
2005-11-04 11:16:38 +00:00
Carl Worth
719334c52c Rename surface->backend->show_glyphs to surface->backend->old_show_glyphs.
Move show_glyphs fallback from gstate to surface where it belongs.
Reviewed by: keithp
2005-11-01 16:40:37 +00:00
Keith Packard
a3ae0aecc4 Clean up argument order for _fallback_stroke to match other functions 2005-11-01 10:33:34 +00:00
Carl Worth
a7228cc37a Originally 2005-10-28 Keith Packard <keithp@keithp.com>:
Remove pen_regular field from the gstate.
Move stroke fallback from gstate to surface where it belongs.
Eliminate dependence on cairo_gstate_t object.
Fix to include just cairo-clip-private.h rather than cairo-gstate.private.h.
2005-10-31 16:55:21 +00:00
Tor Lillqvist
3cae05c4c5 Call _cairo_scaled_glyph_set_path(). 2005-10-31 11:10:13 +00:00
Keith Packard
1a25220634 Use _cairo_pattern_get_extents in _fallback_paint to bound paint operators. 2005-10-28 21:00:42 +00:00
Keith Packard
83ff8ea194 Bound mask fallback operation by transformed mask and source. This should speed up any applications calling cairo_mask with a bounded source or mask operand. 2005-10-28 20:49:59 +00:00
Keith Packard
93cbc71a79 Split _cairo_operator_bounded into two separate functions _cairo_operator_bounded_by_mask and _cairo_operator_bound_by_source to distinguish between how operators use source and mask operands. 2005-10-28 20:41:22 +00:00
Carl Worth
1540504bd6 Fix leak of pattern (missing _cairo_pattern_fini).
Move mask fallback from gstate to surface where it belongs.
Temporarily export some previously private cairo_gstate functions, (soon to become private cairo_fallback functions).
2005-10-27 17:16:46 +00:00
Carl Worth
ce7b19fc34 Move paint fallback from gstate to surface where it belongs.
Add clip pointer to surface.
2005-10-27 15:06:53 +00:00
Carl Worth
e406f4b0f0 Add explicit NULLs for unimplmented backend functions to better document what might be improved here. 2005-10-25 16:02:08 +00:00
Carl Worth
16d79e2129 Mark the composite-integer-translate-source test as now passing for the PS backend (6 to go).
Use fallbacks for any operation using a pattern other than a solid pattern, since it's the only type that will actually emit anything right now.
Add comments indicating these functions are not yet implemented.
2005-10-18 16:09:21 +00:00
Carl Worth
85abc42302 Mark the operator-source and trap-clip tests as now passing for the PS backend (7 to go).
Replace the surface->fallback_region with a page-level surface->fallback Boolean instead, since that's all it was being used as anyway.
Do nothing in the ps_output->fallback case.
Do nothing in the ! ps_output->fallback case.
Reviewed by: keithp
2005-10-18 15:58:32 +00:00
Carl Worth
4f97b2edb5 New function to create a snapshot copy of a pattern.
Port code to use _init_pattern_with_snapshot rather than _cairo_pattern_init_copy for all source and mask patterns.
New function to create a snapshot copy of a surface (still preliminary---no support for meta-surfaces or any other surface for which acquire_source_surface will fail).
Add new surface->is_snapshot and initialize to FALSE.
Assert that none of these surface-modifying functions are ever called with a snapshot surface.
Reviewed by: keithp, otaylor
2005-10-13 21:00:52 +00:00
Carl Worth
9d27993ced Add comment for obviously broken function. 2005-10-13 20:15:29 +00:00
Carl Worth
31a561e2c2 Push fill_path fallbacks down from gstate into the surface where all the other fallbacks are.
Add _cairo_surface_is_meta.
Add antialias to the fill_path meta-surface command.
Add an antialias parameter to the backend fill_path function.
Fix test description.
Reviewed by: keithp
2005-10-13 16:55:14 +00:00
Carl Worth
097f240c6d Fix indentation. 2005-10-13 07:33:07 +00:00
Tor Lillqvist
cd859a23d0 Intersect clip region with target surface so we don't waste time and memory.
Reviewed by: cworth
2005-10-12 15:05:09 +00:00
Carl Worth
990dfde447 Add return value at ASSERT_NOT_REACHED. 2005-10-12 13:33:38 +00:00
Kristian Høgsberg
d794c624cc Implement non-uniformly spaced color stops for PDF gradients. Patch from Jens Taprogge (#4722). 2005-10-11 13:20:44 +00:00