summaryrefslogtreecommitdiff
path: root/src/cairo-clip-private.h
AgeCommit message (Collapse)AuthorFilesLines
2008-09-02Revamp the build system.Behdad Esfahbod1-0/+3
Quick summary of changes: - Move list of cairo source files out of src/Makefile.am and into src/Sources.mk, - Generate files src/Config.mk and src/Config.mk.win32 that choose the right set of source files and headers based on configured backends and features. This drastically simplifies building using other build systems. The src/Makefile.win32 file needs to be updated to reflect these changes. - Add README files to various directories, - Add toplevel HACKING file.
2007-10-19[cairo-clip] Avoid work when all clipped out.Chris Wilson1-0/+2
When the clip mask is empty we perform actions like composite 0x0 surfaces, which results in a lot of unnecessary work and allocations. Avoid doing work when we know everything is clip out and take the liberty of freeing any memory associated with the clop state.
2007-09-25[cairo-atomic] Rewrite reference counting using atomic ops.Chris Wilson1-6/+6
Introduce an opaque cairo_reference_count_t and define operations on it in terms of atomic ops. Update all users of reference counters to use the new opaque type.
2007-09-25Move GCC attributes wrapping into a separate header.Chris Wilson1-0/+1
The wrapping of GCC attributes (such as cairo_private) needs to be visible to any header file, including those that avoid cairoint.h such as cairo-boilerplate. To achieve this we move the pre-processor magic to its own header file and include it as required.
2007-08-23Remove include of cairoint.h from *-private.h header files.Carl Worth1-1/+0
These were recently added, (as part of sparse integration?), but they break boilerplate which reaches into at least cairo-types-private.h and cairo-scaled-font-private.h. But boilerplate cannot see cairoint.h or else it gets the internal sybol renaming, (with the INT_ prefix), and then all the test suite tests refuse to link. If this change reverts some recently-added functionality, (or cleanliness), then we'll just need to find some other way to add that back again without the breakage.
2007-08-22[Makefile.am] Add target sparse to run sparse static source code analyzerBehdad Esfahbod1-0/+1
There are still some bits not quite working.
2007-07-18[fixpt] Create cairo_region wrapper around pixman_region16_tVladimir Vukicevic1-2/+2
Insulate region-using code from implementation details; at some point we'll want to switch to using 32-bit regions.
2007-07-18[fixpt] Replace cairo_rectangle_int16_t with cairo_rectangle_int_tVladimir Vukicevic1-3/+3
Mostly s/cairo_rectangle_int16_t/cairo_rectangle_int_t/, as well as definitions to pick cairo_rectangle_int_t.
2007-04-10Make _cairo_clip_reset voidCarl Worth1-1/+1
Yet another unconditionally successful function---so it's easier to return nothing.
2007-04-10pixman region operations can fail, propagate the error.Chris Wilson1-2/+2
Copying the clip region could fail, add error returns and propagate up the call stack.
2007-04-08Remove redundant _cairo_clip_fini functionMathias Hasselmann1-3/+0
2007-04-08Make region of cairo_clip_t staticMathias Hasselmann1-1/+2
2007-04-03Make sure all nil objects start with _cairo_Behdad Esfahbod1-1/+1
Previously, the convention was that static ones started with cairo_, but renamed to start with _cairo_ when they were needed from other files and became cairo_private instead of static... This is error prune indeed, and two symbols were already violating. Now all nil objects start with _cairo_.
2007-01-17Rename cairo_copy_clip_rectangles to cairo_copy_clip_rectangle_listRobert O'Callahan1-1/+1
2006-09-25Add clip getters API + testsRobert O'Callahan1-0/+5
Add new public API methods: void cairo_clip_extents (cairo_t *cr, double *x1, double *y1, double *x2, double *y2); cairo_rectangle_list_t *cairo_copy_clip_rectangles (cairo_t *); void cairo_rectangle_list_destroy (cairo_rectangle_list_t *); Also add 'get-clip' and 'get-path-extents' tests.
2006-06-06Fix bogus cairo_rectangle_fixed_t to be cairo_rectangle_int16_t.Carl Worth1-3/+3
This rectangle has regular integer values, not fixed-point values. So the old name was horribly wrong and misleading, (and yes I think it was even I that had suggested it).
2006-06-06Remove trailing whitespace from lines that look like comments.Carl Worth1-1/+1
This patch was produced with the following (GNU) sed script: sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//' run on all *.[ch] files within cairo, (though I manually excluded src/cairo-atsui-font.c which has a code line that appears as a comment to this script).
2006-05-04Add missing prototype for _cairo_clip_translateCarl Worth1-0/+5
2006-05-04Rename cairo_rectangle_t to cairo_rectangle_fixed_t.Robert O'Callahan1-9/+9
This is in preparation for a later function addition for extracting clip rectangles from a cairo_t, (which will add a public cairo_rectangle_t).
2006-05-04Fix up clip at pop_group time, to keep it in surface backend coordinatesVladimir Vukicevic1-0/+5
We keep the clip in surface-backend coordinates always, so it needs fixing whenever we change the target surface out in the gstate. The only place this happens is in push_group, so fix it as part of gstate_redirect().
2005-12-18Move enum to cairoint.hChristian Biesinger1-6/+0
add CAIRO_BEGIN_DECLS and CAIRO_END_DECLS, and move an enum from cairo-clip-private.h here (C++ doesn't like forward-declarations of enums). Final patch for allowing C++ backends. reviewed by: cworth
2005-12-16Globally rename "operator" to "op", to allow writing backends in C++Christian Biesinger1-1/+1
reviewed by: cworth
2005-08-08Add a new API for disabling antialiasing of shapes drawn by cairo. This is a ↵Billy Biggs1-0/+2
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-08Add a function to test whether a cairo_operator_t is bounded (does nothing ↵Owen Taylor1-3/+6
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-04New files. Move code for manipulating cairo_clip_t out into cairo_clip_* ↵Kristian Høgsberg1-0/+118
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