| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
This patch was produced with the following (GNU) sed script:
sed -i -r -e '/^[ \t]*[{}][ \t]*/ s/[ \t]+$//'
run on all *.[ch] files within cairo.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
This patch was produced with the following (GNU) sed script:
sed -i -r -e 's/^[ \t]+$//'
run on all *.[ch] files within cairo.
|
| |
|
|
|
|
|
|
| |
This assumes that the directfb, glitz, and quartz backends
always create surfaces with content of COLOR_ALPHA which might
be totally wrong.
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
cairo_image_surface_create_for_data
|
|
|
|
|
|
|
|
|
|
|
| |
This closes bug #5816:
Image surfaces do not start out blank by default
https://bugs.freedesktop.org/show_bug.cgi?id=5816
This also fixes all of the test suite failures introduced by moving
the CLEAR on blank page optimization up to the paginated surface from
the PS surface.
|
|
|
|
|
|
|
|
| |
This adds an aactual test_paginated_surface_backend rather than just
having this test surface create a paginated surface around an image
surface. This is a more realistic test of what a paginated surface is
and should be more useful as an example of how to use the paginated
surface, (and in particular the analysis portions).
|
| |
|
|
|
|
|
|
|
|
| |
cairo_rectangle;cairo_fill for clearing a surface.
Add documentation. Add a cairo_content_t argument to PDF surface constructors.
Add documentation. Add a cairo_content_t argument to PS surface constructors.
Track changes in PS/PDF surface constructor API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is to test both a COLOR_ALPHA and a COLOR content for each surface backend, (since the semantics are different and we probably need to support both in each backend.
The PS/PDF backends don't allow a content to be passed in right now, so they fail against the rgb24 tests, but the trivial addition to the constructors will allow them to pass all tests with both content values.
And new constructors (currently internal only) to create an image surface with a cairo_content_t rather than a cairo_format_t.
Add a cairo_content_t argument to the constructor.
Add a cairo_content_t to the constructor and use this content value when constructing intermediate image surfaces in acquire_source, show_page, copy_page, and snapshot.
Add image flattening by compositing over white, as is done in cairo-ps-surface.c.
Track changes to cairo-paginates-surface which now requires a cairo_content_t value (no change to public PS/PDF constructors yet).
Track change in meta-surface and paginated-surface interfaces by now accepting a cairo_content_t rather than a cairo_format_t.
Ignore new output files (argb32 from pdf and ps as well as rgb24 from test-fallback, test-meta, and test-paginated).
Add new utility for flattening PNG images in order to generate the -argbf-ref.png images.
Add image_diff_flattened for comparing flattened output from PS and PDF backend with ARGB reference images by first blending the reference images over white.
Get rid of conditional, format-specific background-color initialization before running tests. Now uses ARGB(0,0,0,0) in all cases. Switch from specifying tests with a format value to specifying tests with a content value. Add support for a 'fake' COLOR_ALPHA_FLATTENED content for testing the PS and PDF output against a flattened version of the argb32 reference images (first blended over white).
Track change in cairo_ps_surface_create (now requires cairo_content_t value).
Adjust tests that draw in default (black) to first paint white so that the results are visible.
Adjust ARGB32 reference images for new white background for changed tests.
Adjust RGB24 reference images for new black background due to changed initialization (and the tests themselves being unchanged).
|
|
|
|
|
| |
Throw away old gradient code from within cairo-pattern.c in favor of using new support in pixman for gradients.
Update reference images for all tests involving gradients since the gradient output has changed slightly.
|
|
|
|
|
|
|
| |
(_cairo_glitz_surface_get_image): Set the glitz clip to NULL before calling glitz_get_pixels, to return the full surface contents. Restore clip afterwards. (_cairo_glitz_surface_composite_trapezoid): Return UNSUPPORTED if the antialias is anything other than DEFAULT/GRAY.
Try to recover a standard cairo_format_t from given pixman format masks, so that various things that only work with a standard format work correctly.
Remove cairo_glitz_surface_write_to_png, replace with generic cairo_surface_write_to_png (since it works with image-surface create_with_masks fix)
|
|
|
|
|
| |
Eliminate some unnecessary _cairo_image_abstract_surface variations of backend function.
Remove errant include of cairo-pdf.h.
|
|
|
|
| |
reviewed by: cworth
|
|
|
|
|
| |
Move show_glyphs fallback from gstate to surface where it belongs.
Reviewed by: keithp
|
|
|
|
| |
_cairo_operator_bounded_by_mask and _cairo_operator_bound_by_source to distinguish between how operators use source and mask operands.
|
|
|
|
| |
Update everybody to use _PAD instead of _NEAREST.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
outside of the source area. Note that for gradients, applications which had explicitly set a repeat mode of NONE will now need to change to use NEAREST to get the same behaviour.
Split CARIO_EXTEND_DEFAULT to indicate defaults for surfaces and gradients. The default for gradients is still the NEAREST beaviour.
Support the NEAREST mode, change NONE to be TRANSPARENT.
Update the extend mode code to use the pixman support.
Handle NEAREST, note that support for NONE is not yet handled for gradients.
Add a check for NEAREST but don't do anything useful.
Add a check for NEAREST but don't do anything useful.
Update a comment about the extend support in the image backend.
reviewed by: davidr, cworth, otaylor
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dest SOURCE: (mask IN clip) ? src : dest That behave more like what people expect.
CLEAR and SOURCE are now bounded.
Assert that SOURCE and CLEAR aren't passed to these functions.
Assert that SOURCE and CLEAR aren't passed to these functions when there is a mask.
Do fixups for SOURCE and CLEAR as well as unbounded operators, since in the absence of a mask, we need SOURCE to work correctly (don't care about CLEAR)
_cairo_ft_font_show_glyphs) Consistently use CLEAR/TRANSPARENT (source doesn't matter) rather than SOURCE/TRANSPARENT when clearing rectangles.
src/cairo-xlib-surface.c src/cairo-surface.c: Use IN rather than SOURCE as an example of an unbounded operator in docs.
Remove CLEAR/SOURCE columns since they are no longer unbounded.
test/operator-clear.c test/operator-source Makefile.am: Add targetted tests of CLEAR/SOURCE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
src/cairo-clip.c src/cairo-gstate.c: Use them.
Move code to fill a pixman_region16_t to here.
Document.
Use _cairo_surface_fill_region().
Add a return status, use regions to simplify.
src/cairoint.h
Handle the return value from _cairo_surface_composite_fixup_unbounded().
src/cairo-surface.c src/cairoint.h (_cairo_surface_composite_shape_fixup_unbounded): Add a variant of _cairo_surface_composite_fixup_unbounded() to avoid creating a dummy cairo_surface_attributes_t.
Use _cairo_surface_composite_shape_fixup_unbounded().
Call _cairo_surface_composite_shape_fixup_unbounded(), since the source might still be restricted, even though the mask is unbounded.
Restore the rectangle optizations when drawing with unbounded operators by adding a clear for the extra area after drawing the rectangles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
(_cairo_quartz_surface_acquire_dest_image) src/cairo-xcb-surface.c (_cairo_xcb_surface_acquire_source,dest_image): src/cairo-xlib-surface.c (_cairo_xlib_surface_acquire_source,dest_image): Set image_extra to NULL to avoid purify warnings. (#3777, Stuart Parmenter)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memory management semantics:
_cairo_path_data_create_in_error _cairo_pattern_create_in_error _cairo_surface_create_in_error
Don't bother with extra check of other->status to anticipate and try to prevent cairo_surface_create_similar from returning through cairo_surface_create_in_error.
Just return &_cairo_surface|pattern|path_nil rather than _cairo_surface|pattern|path_create_in_error.
After checking surface->status from a cairo_<foo>_surface_create function, just return CAIRO_STATUS_NO_MEMORY since that's the only error we'll get from one of these create functions.
Remove unnecessary check for gstate == NULL;
Fix old check for image == NULL instead of image->base.status.
Add missing check of surface->image_base.status after creating surface->image.
Add missing check of surface->base.status after creating surface.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
argument.
Track change in _cairo_pattern_release_surface and also pass the appropriate pattern for each acquired surface. The previous backend mismatch was causing memory leaks.
Remove stale comment.
Add missing fclose to keep valgrind happy about memory leaks.
|
|
|
|
| |
bug in libpixman that has since been fixed. So now it was just a memory leak.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
different functions corresponding to the three different clipping modes.
Add NULL pointers for intersect_clip_path.
New test case to exercise PDF clipping code.
|
|
|
|
| |
function since nothing anywhere is actually using this parameter.
|
| |
|
| |
|
|
|
|
| |
Track change in signedness of data member/parameter.
|
|
|
|
| |
(expanding on preliminary work by Robert O'Callahan <rocallahan@novell.com>)
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
and are easier to understand, (eg. CAIRO_OPERATOR_DEST_OVER instead of CAIRO_OPEERATOR_OVER_REVERSE).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Add new get_extents function to the surface backend interface.
Add function to query current clip_extents.
Implement the new get_extents function for each backend.
Save the clip extents from set_clip_region and implement _cairo_surface_get_clip_extents.
Abstract away the evil XGetGeometry roundtrip in _cairo_xlib_surface_get_size.
Rewrite a couple of tests to call cairo_paint.
|
|
|
|
|
| |
Fix to actually set surface->finished when done. Closes bug #2950 as documented in test/surface-finish-twice.c.
Note that this bug is fixed.
|
|
|
|
|
|
| |
functions.
Eliminate stub functions and replace with NULL in surface backend table.
|
|
|
|
|
|
|
|
|
|
|
|
| |
cairo_matrix_t.
Add new function to return current matrix: cairo_get_matrix
Deprecate the following functions (in documentation): cairo_matrix_create cairo_matrix_destroy cairo_matrix_get_affine
Rename: cairo_matrix_set_affine -> cairo_matrix_init cairo_matrix_set_identity -> cairo_matrix_init_identity
Add other new matrix initialization functions: cairo_matrix_init_translate cairo_matrix_init_scale cairo_matrix_init_rotate
Change return type of almost all cairo_matrix functions from cairo_status_t to void.
Track changes to cairo_matrix_t interface.
Add a test case showing the same path drawn under various transforms, (including skews set directly by initializing a cairo_matrix_t).
|
|
|
|
|
|
|
|
| |
Propagate the unsigned char* change down the stack.
Add cast since XImage uses char* rather than unsigned char*.
Fix memory leak of image data.
Switch to use cairo_surface_write_png rather than a custom write_png_argb32.
Add test to exercise the cairo_image_surface_create_for_png function.
|