Commit graph

1127 commits

Author SHA1 Message Date
Kristian Høgsberg
7caa7cccf2 Update doc comment. 2005-08-08 13:50:59 +00:00
Owen Taylor
d4b24dc974 Add reference images 2005-08-08 13:50:02 +00:00
Owen Taylor
8f19aaf9a8 Add a function to test whether a cairo_operator_t is bounded (does nothing for 0 src/mask)
cairoint.h: Add a helper function to take clearing areas that are outside the source/mask but are cleared by unbounded operations.
src/cairo-xlib-surface.c (_cairo_xlib_surface_composite): Use _cairo_surface_composite_fixup_unbounded() as needed.
src/cairo-image-surface.c src/cairint.h: Keep track of whether the surface has a clip or not ... we need this for determining when we can bypass an intermediate mask for composite_trapezoids().
Create an intermediate mask of the right size with pixman_add_trapezoids() and composite that.
When rendering with an unbounded operator, create the intermediate mask ourselves and render with ADD to that, then composite the result.
Create an intermediate surface the size of the extents, render the glyphs to that then composite the results.
Add the size of the glyph
Compute the size of the glyph mask, then use _cairo_surface_composite_fixup_unbounded().
Use the right mask format. (Unrelated bugfix)
New function taking a drawing function as a parameter to encapsulate shared logic between compositing trapezoid, glyphs, and masks.
Use _cairo_gstate_clip_and_composite(). Also fix extents computations for unbounded operators.
src/cairo-clip.c src/cairo-clip-private.h (_cairo_clip_combine_to_surface): Add the destination as an extra parameter to allow combining to an intermediate surface.
tests/unbounded-operator.c tests/Makefile.am: Add a test for the operation of the 6 unbounded operators against different shapes.
tests/clip-operator.c tests/Makefile.am: Add a test that tests surface clipping with different shapes against all the operators.
Make use OVER like the name and description. With fixed semantics, SOURCE does something different.
2005-08-08 13:46:11 +00:00
Carl Worth
31ef9a80e9 Remove several bugs that have been fixed. 2005-08-06 17:00:59 +00:00
Carl Worth
1fadb80656 Remove several bugs that have been fixed.
Slip group support off of the 1.0 roadmap. Update status of clipping work which otaylor is working on.
Update for progress on cairo_surface_mark_dirty (committed), non-antialiased rendering (patch), cairo_arc_to (patch), consistent error handling (committed), cairo_content_t (committed). Remove details for some completed items.
Don't crash if font_face is NULL, (this is a documented mechanism for returning to the default font_face).
2005-08-06 16:57:14 +00:00
Carl Worth
2f1024f83f Fix to return &_cairo_font_face_nil instead of NULL on error. 2005-08-06 16:38:33 +00:00
Jeff Muizelaar
8c52b287f3 Give reason for failure. 2005-08-06 15:10:36 +00:00
Owen Taylor
158b338fb2 Remove a non-sensical XXX that crept in at some point; for a solid color, there is no difference between premultiplied and non-premultiplied colors. 2005-08-06 10:22:07 +00:00
Carl Worth
f367e69332 Fix up some stale comments. Rename _cairo_ft_scaled_font_create_for_unscaled to its proper name of _cairo_ft_scaled_font_create (which is available now that _cairo_ft_scaled_font_create_toy has its correct name). Also prefer 'scaled_font' over 'f' as an identifier. 2005-08-06 00:09:17 +00:00
Carl Worth
e63e0578b1 Unify initialization for _cairo_ft_unscaled_font_create_from_face and _cairo_ft_unscaled_font_create_from_filename through new _cairo_ft_unscaled_font_init. 2005-08-05 23:41:41 +00:00
Carl Worth
c4a806f21c Rename _ft_font_face_backend to be preoperly namespaced as _cairo_ft_font_face_backend. 2005-08-05 22:37:29 +00:00
Carl Worth
ff147497e5 Rename cairo_ft_font_face->next_face to next. 2005-08-05 22:35:04 +00:00
Carl Worth
cfcab8fe44 Include cairo-hash-private.h.
Add cairo-hash.c and cairo-hash-private.h since we're actually going to start using them now.
2005-08-05 22:29:06 +00:00
Jeff Muizelaar
de87ebcc1c Fix problems in render fb implementation found by rendercheck:
- fbCombineSaturate was pointed at fbCombineDisjointOver, instead of fbCombineDisjointOverReverse as it should. Instead, point fbCombineDisjointOverReverse at fbCombineSaturate (which is likely to be faster).
- fix previously-unused fbCombineSaturate implementation.
- fbCombineMaskAlphaC was just a copy of fbCombineMaskValueC. Make it do what it's supposed to (return a cs.alpha).
- fbCombineAtopC didn't invert the source alpha value.
- fix copy'n'paste errors in fbCombine(Dis/Con)jointGeneralC, also source alpha wasn't treated in a component fashion.
From anholt.
2005-08-05 22:17:08 +00:00
Jeff Muizelaar
71e560a8fa Temporarily disable the 24bpp WORKING_UNALIGNED_INT because of a crash when using electric-fence when accessing hte last pixel of a drawable (last pixel is 3 bytes, read it as a 4 byte word, and you're reading one extra pixel, which doesn't normally matter, but does in a few rare cases). Should be easy to work around, but that will come later.
From jaymz
2005-08-05 21:35:51 +00:00
Carl Worth
417a66da5e Simplify the implementation by taking advantage of the fact that destroy and reference are safe for NULL, and that reference returns its argument. 2005-08-05 21:33:41 +00:00
Carl Worth
80b944418c Rename two functions:
_cairo_gstate_unset_font -> _cairo_gstate_unset_scaled_font _cairo_gstate_ensure_font -> _cairo_gstate_ensure_scaled_font
2005-08-05 21:27:21 +00:00
Carl Worth
75e3d28834 Entagle the cairo_unscaled_font_t typedef. 2005-08-05 21:02:25 +00:00
Carl Worth
c14f2252b1 Rename font_face_backend->create_font to scaled_font_create. Group the scaled_font prototypes together. A little more simple -> toy renaming.
A little more simple -> toy renaming.
Track rename of font_face_backend->scaled_font_create.
2005-08-05 20:53:09 +00:00
Carl Worth
9c1fe21cd7 Rather gratuitous (though mostly harmless) whitespace changes for font backend tables. 2005-08-05 20:30:43 +00:00
Carl Worth
4ad365f183 Document the implicit closing of sub-paths for cairo_fill and cairo_fill_preserve. 2005-08-05 20:15:19 +00:00
Carl Worth
d150513c6a Rename parameters to scalend_font_backend from font to scaled_font. 2005-08-05 17:27:57 +00:00
Carl Worth
b482e1e25e Rename scaled_font_backend->destroy to the more accurate fini, (since it frees only the dependent data within the scaled_font and not the scaled_font itself).
Track rename of scaled_font_backend->fini.
2005-08-05 17:00:38 +00:00
Carl Worth
76f80cc42e Rename scaled_font_backend->create to create_toy. Move declaration of cairo_simple_font_face_t from cairo_font.c to cairoint.h and rename it cairo_toy_font_face_t. Rework create_toy to accept a cairo_toy_font_face_t rather than separate family, slant, and weight.
Track change in create_toy interface.
Partial rename of simple->toy. It's not complete as this is a step in the process of merging in a large patch of mine which actually removes most of the affected code.
2005-08-05 16:44:20 +00:00
Carl Worth
8d0452c1ee ignore a8-mask 2005-08-05 15:49:52 +00:00
Carl Worth
5925e3520f Patch memory leaks. 2005-08-05 15:48:42 +00:00
Jeff Muizelaar
53bd9879bb Add a test case for CAIRO_FORMAT_A8 masks that fails with libpixman. 2005-08-05 15:07:45 +00:00
Carl Worth
549b7ff2a6 Bump automake_min_vers up to 1.7 since we clearly don't work with 1.4 anymore. 2005-08-05 15:01:55 +00:00
Jeff Muizelaar
ec93e241b0 Fix fbGetDrawable
Patch from Billy Biggs <vektor@dumbterm.net>.
2005-08-05 12:26:33 +00:00
Jeff Muizelaar
3ef2488265 Fix some of the 4 bit per channel PICT definitions
Patch from Billy Biggs <vektor@dumbterm.net>.
2005-08-05 12:14:12 +00:00
Jeff Muizelaar
2b20b7a230 Fix up the fast-path compositing operators; those are useful for sources without alpha, but can't be used for sources with alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would be nice to optimize fbBlt for common cases involving 8, 16, 24 and 32bpp.
From Keith Packard.
2005-08-05 11:44:49 +00:00
Jeff Muizelaar
594ba3ef69 use the newly added buffer_diff_noalpha for comparing buffers of CAIRO_FORMAT_RGB24. 2005-08-05 11:23:51 +00:00
Jeff Muizelaar
5f78feda5d rewrite buffer_diff to be endian safe and add a new fuction buffer_diff_noalpha 2005-08-05 11:15:04 +00:00
Carl Worth
2e1eaa88ff Remove CAIRO_BEGIN_DECLS and CAIRO_END_DECLS which don't belong here. 2005-08-05 10:46:40 +00:00
Carl Worth
7d88cdd15b Remove unused variable. 2005-08-05 10:43:07 +00:00
Carl Worth
e59d1dff7f Ignore cairo-clip-private.h.
Drop non-existent cairo-atsui.xml.
Fix misnamed parameters in comment blocks.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
2005-08-05 10:40:32 +00:00
Carl Worth
59d7f60249 Add some missing declarations to the appropriate sections.
churn
Rename cairo_path_nil to _cairo_path_nil since it may be exported, and tag it cairo_private to try to avoid exporting it. Qualify it as const well.
Track new name of _cairo_path_nil and cast away the const as required.
2005-08-05 10:30:31 +00:00
Carl Worth
a2dc18fd0c Remove include of math.h since cairoint.h does it more carefully, (for annoying platforms for which just including math.h without extra defines is not enough).
Replace Cairo with cairo.
Include config.h so HAVE_UNISTD_H gets picked up as necessary.
Fix non-UTF-8 copyright symbol.
2005-08-05 10:05:29 +00:00
Carl Worth
72f40f58bb More obnoxious tmpl churn 2005-08-05 10:03:04 +00:00
Carl Worth
2eabc47b85 Sort cairo-clip.c 2005-08-05 09:49:38 +00:00
Carl Worth
0586daaa29 Patch from John Ehresman <jpe@wingide.com> to aid win32 compilation:
Define snprintf as _snprintf when under the influence of _MSC_VER.
Define int32_t and friends as __int32 and friends when under the influence of _MSC_VER.
Make include of unistd.h conditional on HAVE_UNISTD_H.
2005-08-05 07:48:18 +00:00
Kristian Høgsberg
fd27af574d Patch from Adrian Johnson <ajohnson@redneon.com>
Remap composite glyps to use subset font glyph indices.
2005-08-04 23:10:26 +00:00
Kristian Høgsberg
ebf985c876 New files. Move code for manipulating cairo_clip_t out into cairo_clip_* functions and put them in cairo-clip.c.
Rewrite to use new cairo_clip_t functions for manipulating the clip state, change the clip_and_composite_trapezoids call tree to use cairo_clip_t instead of cairo_gstate_t.
Use new cairo_clip_t function to maintain clip state while replaying.
Pass fill rule and tolerance directly, to break gstate dependency.
New function. Set the clip for a surface as specified by the cairo_clip_t.
Move translate_traps() from cairo-gstate.c to here and rename it.
Reviewed by: otaylor
2005-08-04 22:45:59 +00:00
Kristian Høgsberg
27573750eb Change *_reference() functions to return the object being referenced. 2005-08-04 18:44:29 +00:00
Tor Lillqvist
a8ccf31620 Check for render bug involving repeated patterns with a general transform matrix. 2005-08-04 15:53:30 +00:00
Carl Worth
b5ab1741e9 Originally 2005-07-13 Carl Worth <cworth@cworth.org>
Export opaque cairo_ft_unscaled_font_t and change _cairo_ft_unscaled_font_[un]lock_face to accept cairo_ft_unscaled_font_t rather than cairo_unscaled_font_t.
Cast explicitly to cairo_ft_unscaled_font_t to track change in prototype of _cairo_ft_unscaled_font_[un]lock_face.
Lots of renaming to use consistent namespacing:
ft_font_transform_t -> cairo_ft_font_transform_t ft_font_face_t -> cairo_ft_font_face_t ft_unscaled_font_t -> cairo_ft_unscaled_font_t
Add missing _cairo prefix to many functions.
Disambiguate _ft_scaled_font_create and _cairo_ft_scaled_font_create by renaming the former to _cairo_ft_scaled_font_create_for_unscaled.
Reviewed by: otaylor
2005-08-04 13:22:15 +00:00
Carl Worth
b45f688765 Fix for bug #3951:
Add new _CHECK_FUNCS_WITH_FLAGS to abstract out the pain of temporarily setting flags for AC_CHECK_FUNCS. Use this to check for the existence of FcFini.
Make call to FcFini conditional on HAVE_FCFINI.
Remove stale comment about cleaning up memory which is now handled by cairo-test.c.
2005-08-03 10:32:50 +00:00
Billy Biggs
ba87f1324f Optimize spans where the same value is being added to multiple pixels. This improves the speed of rasterizing wide trapezoids.
Add an INLINE macro that matches the one from fbpict.h in xserver/fb.
2005-08-01 18:01:24 +00:00
Owen Taylor
500cc6fed1 src/cairo-gstate.c src/cairo-gstate-private.h: Store the inverse CTM at the time of cairo_gstate_set_source() to "lock" the user space matrix.
Move the source pattern transformation to the outside of _cairo_gstate_clip_and_composite_trapezoids() instead of doing it at the leaves.
Change size of output surface for aesthetics.
Updated to correspond to the current definition.
Remove source-surface-scale-paint.
reviewed by: cworth
2005-08-01 14:39:01 +00:00
Carl Worth
c525c684ca New public header file.
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-01 13:33:47 +00:00