Commit graph

945 commits

Author SHA1 Message Date
Carl Worth
e3017c3c8d Merge in upstream 'ps-surface' changes 2006-02-28 12:07:14 -08:00
Keith Packard
2984f60a3a Need cairo_analyze_surface_get_extents 2006-02-27 20:09:24 -08:00
Keith Packard
9ca67992a5 Support meta surface patterns 2006-02-27 20:05:57 -08:00
Keith Packard
ad247974eb Release pattern source image when done with it 2006-02-27 19:34:32 -08:00
Keith Packard
59e4a32d55 Primitive ps glyph support. Fix ps strokes to not leave path defined 2006-02-27 19:23:47 -08:00
Keith Packard
06b83b89fc Support image surface patterns 2006-02-27 17:49:53 -08:00
Carl Worth
ce683a2402 Drop gratuitous structure with single function pointer. Rename
paginated_set_mode to set_paginated_mode.
2006-02-27 15:12:15 -08:00
Carl Worth
aecb07a26d cairo_analysis_surface: Rename region_[un]supported() to get_[un]supported(). 2006-02-27 14:58:51 -08:00
Carl Worth
2660e79e67 Rename cairo_analyze_surface_t to cairo_analysis_surface_t. 2006-02-27 14:56:41 -08:00
Keith Packard
f9d4482137 rename evaluate surface to analyze surface, pull to separate files 2006-02-27 17:14:57 -05:00
Keith Packard
cb3a445150 Primitive "real" postscript output for stroke/fill/paint 2006-02-27 19:47:14 +01:00
Carl Worth
5a3c30eafe Implement cairo_font_face_get_type.
Add font type to font_face_backend.
Also export new CAIRO_FONT_TYPE_TOY.
2006-02-24 15:32:26 -08:00
Carl Worth
5928d03b49 Remove private cairo_pattern_type in favor of new public one. Rename
all values to now include TYPE. Drop _GRADIENT from LINEAR and RADIAL.
2006-02-24 15:25:19 -08:00
Carl Worth
f58f39d7af cairo.h: Fix typo (thanks to Torsten Schoenfeld) 2006-02-24 15:06:50 -08:00
Carl Worth
2fc9fd79e7 cairo.h: Fix two typos in the documentation. 2006-02-24 11:37:50 -08:00
Carl Worth
9287d60d60 Add get_type functions: cairo_surface_get_type,
cairo_pattern_get_type, cairo_font_face_get_type, and
cairo_scaled_font_get_type.
2006-02-24 11:24:03 -08:00
Christian Biesinger
07205ddc4b Mark private functions as cairo_private
(cherry picked from a1c72cd8f244e97d4b6fe3e5d3efa622c8b3f7f9 commit)
2006-02-24 01:38:27 +01:00
Christian Biesinger
0fc25c9853 Don't call _cairo_error when returning an error
Only return it when returning a nil surface.
2006-02-18 21:45:58 +01:00
Christian Biesinger
5c5ea6d523 Fix typo. 2006-02-18 19:36:18 +01:00
Christian Biesinger
f4d9e55962 Use TRUE/FALSE instead of 1/0 for boolean values
(cherry picked from e1703520169e0cf972a6edcaa8660d14806d8c6f commit)
2006-02-16 23:56:16 +01:00
Carl Worth
57edf3f28f Normalize indentation after previous commit. 2006-02-16 09:05:52 -08:00
Carl Worth
0152bd3a56 Allow _get_bitmap_surface to work for 0x0 glyphs, (fix for bug #5734).
Patch from: Behdad Esfahbod <freedesktop@behdad.org>
Reviewed by: Carl Worth <cworth@cworth.org>
2006-02-16 09:02:29 -08:00
Carl Worth
d88c19071f Rename .cvsignore to .gitignore. Add *~ and *.o. 2006-02-15 15:00:26 -08:00
Emmanuel Pacaud
f4270b3dfc convert _cairo_svg_surface_old_show_glyphs to _cairo_svg_surface_show_glyphs. 2006-02-13 14:11:36 +00:00
Emmanuel Pacaud
921dcc16f9 Add mask support and switch to SVG 1.2 for compositing operators.
return xml node instead of cairo status. (emit_composite_svg_pattern): ditto. (emit_composite_pattern): ditto. (emit_operator): use SVG 1.2 operators, since feComposite filter always composite resulting surface to current canvas. (_cairo_svg_surface_composite): removed. (_cairo_svg_surface_fill_rectangles): removed. (intersect): removed. (_cairo_svg_surface_composite_trapezoids): removed. (emit_paint): new. (_cairo_svg_surface_paint): new. (_cairo_svg_surface_mask): new. (_cairo_svg_surface_stroke): emit operator.
2006-02-13 12:41:10 +00:00
Emmanuel Pacaud
be7b6251f3 fix offset of pattern stops. 2006-01-29 13:25:10 +00:00
Behdad Esfahbod
d6ff77c297 Add cairo_scaled_font_text_extents.
New function.
Improve documentation.
2006-01-22 02:33:26 +00:00
Christian Biesinger
2afe78c0c2 Don't mix declarations and code. This makes the code valid ISO C, fixes a gcc -pedantic warning, and unbreaks the build with the compiler Zeta ships with. 2006-01-21 09:39:10 +00:00
Carl Worth
f1fd1cc7a9 Add getter functions for cairo_scaled_font_t. 2006-01-20 15:25:54 +00:00
Carl Worth
13511972b6 Check font_face->status and return a nil scaled font if it is in an error state. (Thanks to Christian Biesinger and sunmoon1997 who pointed this out as part of bug #4674).
With this bug fix, the ft-font-create-for-ft-face test fails (as it should) since it is abusing fontconfig.
2006-01-20 14:48:07 +00:00
Carl Worth
074f886c00 Rip the cairo_content_t argument out of ps/pdf_surface_create as per discussion on cairo mailing list. Instead these surface will behave as if CONTENT_COLOR_ALPHA had been passed (that is, compositing operators will behave as if destination alpha were available).
This also has the benefit of preserving the API that has been in place for PS/PDF surface since the (experimental) stuff in 1.0.0.
Track API change.
Continue testing PS/PDF surfaces in the CAIRO_CONTENT_COLOR mode but do it by rendering to an intermediate similar surface rather than constructing the target surface differently.
2006-01-19 17:48:22 +00:00
Carl Worth
ec45efa57c Fix compilation-breaking typo. 2006-01-18 16:44:19 +00:00
Carl Worth
c634e54775 Change documentation to recommend cairo_paint rather than 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.
2006-01-18 16:40:17 +00:00
Carl Worth
ba69dfefa7 Fix documentation of cairo_arc which erroneously claimed M_PI radians == 90 degrees to correctly say that M_PI/2.0 radians == 90 degrees. This closes bug #5649 (with thanks to kengruven@gmail.com). 2006-01-18 09:46:42 +00:00
Carl Worth
b5c5fb613d Big change to the test infrastructure and supporting internals. The goal now 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).
2006-01-17 16:59:08 +00:00
Carl Worth
59eff46fdf Fix things up to conform with Adobe PostScript Document Structuring Conventions Specification. Thanks to Michael Sweet for bringing several items to our attention. Things that are fixed: Add Pages: (atend) to header, add Pages: N to trailer, properly advertise DocumentData of Binary rather than Clean7Bit, remove fictitious EndPage, move showpage to after the grestore. 2006-01-13 13:41:45 +00:00
Carl Worth
6f3cb04d9c Rip out the misguided paint-with-white and RGB24 surface code and go back to using ARGB32. It turns out that the PS backend already has its own blend-with-white code, and the test-paginated-surface really wants ARGB32. 2006-01-13 11:02:25 +00:00
Carl Worth
b4e4568962 Eliminate cast of state->dx.elements which has been wrong since the internals of cairo_array_t changed on 2005-12-21. Now, hopefully less than all text will be broken on win32. 2006-01-13 09:25:28 +00:00
Carl Worth
4e4b38e759 Add a call to cairo_copy_page, so that that gets called at least once within the test suite.
Fix broken implementation of copy_page in the paginated surface by hiding it from the target surface which sees only show_page operations. (It's hard to do better than that unless we can guarantee thathe subsequent page won't trigger any image fallbacks.)
2006-01-12 16:47:05 +00:00
Carl Worth
3647ff95f9 Some fixes for the fact that multi-page output was totally broken for cairo_ps_surface_t (at least):
Move the Y-axis-flipping to be on a per-page basis (as it was before and as it must be). Put page number back in, (still missing th number of pages from the header).
Add multi-page output for better testing.
2006-01-12 13:36:36 +00:00
Carl Worth
107a52ed61 Paint with white to intermediate RGB24 images before replaying meta-surface to preserve default white background instead of forcing a black background instead. 2006-01-11 16:29:17 +00:00
Carl Worth
ebeaeeccec Note that PS backend has now been switched over to use cairo_paginated_surface_t.
Switch from ARGB32 to RGB24 for intermediate image surface since that's all that the current users of cairo_paginated_surface support anyway.
Switch cairo_ps_surface_t over to use the new cairo_paginated_surface_t. This drastically simplifies the implementation, but temporarily puts the PostScript output back into the land of one-image-per-page. To be fixed soon though with improvements to cairo_paginated_surface_t. Everything still passes the test suite which is good. The test suite currently does no testing of multi-page output, which is quite bad.
2006-01-11 16:01:25 +00:00
Carl Worth
c23d7d4758 Note that from here on out, the PDF output should always pass the entire test suite!
Add new functions needed by users of cairo_paginated_surface_t.
Always snapshot a paginated surface to an image surface, rather than a surface similar to the target. We do this since paginated target surfaces are allowed to not be complete surfaces, (such as not implementing acquire_source_surface).
Switch the implementation of cairo_pdf_surface_t to use cairo_paginated_surface_t. For now this means that all PDF output is fallback images, but this can change incrementally as we go forward.
2006-01-11 11:53:33 +00:00
Anders Carlsson
953561ebbd Remove old scale matrix since it exists in our base class.
(_cairo_atsui_font_set_metrics): Fix descent calculation.
2006-01-10 07:54:17 +00:00
Anders Carlsson
ae807fc936 Add cairo-quartz-private.h
If the destination surface is a quartz surface, get the clip mask from it.
Added.
Keep a copy of the clip mask around.
(_cairo_surface_is_quartz): New function which determines if a given surface is a quartz surface.
2006-01-10 05:28:59 +00:00
Carl Worth
7ce7b20a82 Reviewed by keithp
Change the paginated surface to force all output to come from an image surface (to be refined incrementally as we hook real surface backends up to it).
2006-01-06 14:24:55 +00:00
Carl Worth
fbb8a62797 Reviewed by keithp
Implement copy_page for paginated surface. Fix show_page to destroy the meta-surface and create a new one.
Change these functions to advertise when they are not supported, so that _cairo_paginated_copy_page can implement things differently depending on whether or not it is personal.
Check return values from _cairo_surface_show/copy_page.
2006-01-06 14:11:07 +00:00
David Reveman
6995a83597 Gradient updates in SVG backend and no sorting of color stops in SVG or PDF backend 2006-01-05 15:00:37 +00:00
David Reveman
4215048025 Update gradient code in glitz backend 2006-01-05 05:14:14 +00:00
David Reveman
5ac6e85455 Update gradient code in PDF backend 2006-01-05 05:06:50 +00:00