summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2006-04-25Fix default font options for PS and PDF backends.Carl Worth3-5/+24
The paginated surface layer was missing its get_font_options function. It now defers to the target surface. The PDF backend already had a get_font_options function, but the PS backend was also missing it. This should fix the problem with 72DPI hinting seen in glyph paths in PostScript output. Thanks to Owen Taylor for identifying this problem and the correct fix.
2006-04-25PDF: Execute entire path in user coordinates when stroking so that line ↵Keith Packard1-9/+86
params are interpreted correctly
2006-04-25PDF: Add SMask output and simplify analysis to support all OVER operations.Carl Worth1-90/+199
With this SMask support, the PDF backend is now able to handle a very large subset of the things that are likely to be thrown at it in common operation, (for example, when handling images and text from web pages).
2006-04-25PDF: Remove unused backend functions.Carl Worth1-362/+4
Since the switch to using paginated, we have a guarantee that the following functions will never be called. So we drop them now: _cairo_pdf_surface_composite _cairo_pdf_surface_fill_rectangles _cairo_pdf_surface_composite_trapezoids _cairo_pdf_surface_old_show_glyphs
2006-04-24PDF: Fix surface pattern transformation and support for EXTEND_NONE.Carl Worth1-13/+72
There's a bunch of careful matrix transformation here needed to resolve the differences between cairo and PDF pattern matrices, (primarily due to the different location for the origin). This fixes the several PDF test suite failures that recently appeared when we switched from ARGB32 to RGB24 source surface patterns.
2006-04-24Fix broken error-checking in cairo_{ps,pdf}_surface_set_dpiCarl Worth2-2/+2
2006-04-24Fix invalid restore that was causing subsequent pages after first to be invertedCarl Worth1-1/+3
2006-04-20PDF: Cleanup error handling of emit_image_rgb_dataCarl Worth1-17/+20
2006-04-19PDF: Add simple implementation of _cairo_pdf_surface_show_glyphs (text as ↵Carl Worth1-3/+24
paths). This isn't very exciting text output---it simply turns every call to cairo_show_glyphs into a single filled path. But at the very least, text will no longer trigger image fallbacks for the PDF backend. With this commit, the following tests change from all-fallback to all-native for the PDF backend: show-text-current-point text-antialias-gray text-antialias-none text-antialias-subpixel text-cache-crash text-rotate There are rasterization differences in the output (cairo vs. freetype) so this commit also adds new PDF-specific reference images for some of those tests so that the suite continues to report PASS.
2006-04-18Use fallbacks in PDF backend for CAIRO_ANTIALIAS_NONE.Carl Worth1-2/+14
Perhaps there's a way to preserve that hint in PDF output, but until we have code that actually does that, the correct thing to do is to call it unsupported and let the fallbacks do their thing. With this commit, the two regressions that were recently introduced now pass again. Specifically: rectangle-rounding-error unantialiased-shapes
2006-04-18Add implementation of _cairo_pdf_surface_paint (and fix emit_surface_pattern).Carl Worth1-19/+46
Fix general broken-ness in emit_surface_pattern, enough so that a new implementation of _cairo_pdf_surface_paint does something useful. With this commit, the following tests switch from all-fallback to all-native and still pass the test suite with flying colors: caps-joins caps-sub-paths clip-fill-rule clip-fill-rule-pixel-aligned clip-nesting clip-twice dash-caps-joins dash-offset-negative leaky-polygon line-width paint path-data transforms Meanwhile, the following two tests also switch from fallback to native, but cause the test suite to complain about failures. These both look like a mostly harmless failure to respect the ANTIALIAS_NONE hint in the PDF output: rectangle-rounding-error-pdf-argb32-out.pdf unantialiased-shapes-pdf-argb32-out.pdf
2006-04-18Fix stale code in comment.Carl Worth1-1/+1
2006-04-19Fixing bad mergeChristian Biesinger1-1/+0
The merge in 66ed9811cc542d99cb5a6b6b792c9a9f0832fbf9 re-added this line, which makes cairo link to C++ libraries even on non-BeOS systems. This was originally fixed in 69acfa6576e8d2b97e3e3b8c06badf5486ae0315
2006-04-18Add support for _cairo_pdf_surface_stroke.Carl Worth1-14/+130
Generalize all functions that emit a source pattern to emit both for the stroking and non-stroking PDF properties. Also add an implementation of _cairo_pdf_surface_stroke. With this commit in place, the following tests change from all-fallback to all-native output while no tests report any new failures: dash-zero-legnth fill-and-stroke multi-page new-sub-path rel-path self-intersecting
2006-04-19Use calloc rather than malloc+memsetChristian Biesinger1-3/+1
2006-04-18Merge branch 'cairo' into new-sub-pathCarl Worth47-1439/+4267
Conflicts: src/cairo-path-stroke.c src/cairo-pdf-surface.c src/cairo-ps-surface.c
2006-04-18Enable real analysis for _cairo_pdf_surface_paint.Carl Worth1-6/+55
After this patch we have three PDF tests passing with native output: clip-all fill-rule nil-surface
2006-04-17SVG: Fix mask and try to support CAIRO_CONTENT_ALPHA.Emmanuel Pacaud1-5/+44
Cairo and SVG differ in their implementation of mask. Cairo only uses alpha channel where SVG uses all channels. So, before using a surface for masking, we use a filter that sets RGB channels to 1.0. Support for CAIRO_CONTENT_ALPHA is similar and use the same filter when a SVG alpha surface is composited.
2006-04-17SVG: Don't insert /n/r in base64 encoded image dataEmmanuel Pacaud1-7/+0
That doesn't work since libxml replace them by 

 They were intended to ease readability of generated files.
2006-04-17SVG: Don't check for content type in create_similar, and mark surface as ↵Emmanuel Pacaud1-4/+1
modified when clearing it.
2006-04-16SVG: Add support for CAIRO_CONTENT_COLOR in create_similar.Emmanuel Pacaud1-15/+54
Also add support for testing this feature in test/cairo-test.c And a bunch of unwanted commit of sgml files.
2006-04-15Implement cairo_set_scaled_font().Behdad Esfahbod2-0/+44
2006-04-14Fix _cairo_surface_is_opaque to return FALSE not TRUE for non-image surfaces.Carl Worth1-1/+9
2006-04-14Farm out the surface and pattern analysis functions away from ↵Carl Worth5-72/+83
cairo-ps-surface.c. We're setting things up here for better sharing as PDF surface (and others) now want to do some of the same analysis.
2006-04-14Move analysis of operators from cairo-ps-surface.c to cairo-operator.cCarl Worth4-68/+132
2006-04-14Add tests for PAGINATED_MODE_ANALYZE to PDF (no real analysis yet)Carl Worth1-4/+35
2006-04-14Change cairo_image_surface_create to zero out surface contents.Dom Lachowicz1-3/+4
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.
2006-04-14Move optimization of CLEAR on blank page up from PS to paginated surface.Carl Worth3-27/+38
2006-04-14Add stub implementations of drawing operations for the PDF backend.Carl Worth1-57/+103
These new stubs explicitly return UNSUPPORTED unconditionally. This is no different than the implicit UNSUPPORTED which the analysis surface was inferring from NULL for 4 of the functions before. However, _cairo_pdf_surface_fill was actually trying to draw things, but without correctly characterizing it during the analysis stage. This was just an oversight, as the PDF surface was always triggereing full page fall backs anway due to the initial unsupported paint with CLEAR. Now, we explicitly return UNSUPPORTED for all drawing operations so we get image fallbacks by design and not by accident.
2006-04-14Update documentation of cairo_paginated_surfaceCarl Worth2-27/+14
2006-04-14Add a start_page function to the paginated_surface_backend.Carl Worth5-47/+112
This allows for any surface using the paginated_surface backend to easily do stuff at the beginning of each page, (such as writing out any per-page header necessary). This replaces some of the per-page state tracking that the PS surface was doing, (though it still has some left for its optimization of CLEAR on a blank page).
2006-04-14PDF: Fix typo in documentation.Emmanuel Pacaud1-1/+1
2006-04-14SVG: Add documentation for public API. Fix test filenames and add testing of ↵Emmanuel Pacaud1-0/+47
CAIRO_CONTENT_COLOR
2006-04-14SVG: Emulate CLEAR and SOURCE operators on paint call when no clipping ↵Emmanuel Pacaud1-0/+11
region is defined.
2006-04-14Add a new cairo_paginated_surface_backend_t rather than just a single ↵Carl Worth5-52/+63
function pointer.
2006-04-14Fix _composite_trap_region to restore the original clip when done.Carl Worth1-0/+4
2006-04-14Flesh test-paginated-surface out into a complete surface.Carl Worth3-14/+220
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).
2006-04-14Move cairo_pdf_surface_backend to file end so it's easier to find.Carl Worth1-33/+33
2006-04-14Fix skipping zero length dash segments in dash_start.Jeff Muizelaar1-1/+5
The extra check makes sure zero length segments are not skipped when computing the dash start state. This is needed so that we get proper line capping if, for example, the first dash segment has zero length and we have a dash offset of zero.
2006-04-13Move the test for zero length sub edges below the computation of faces.Jeff Muizelaar1-7/+7
Face computation still works if a line has zero length, all that is needed is a slope and a point. This patch fixes bug #5561 because the faces are initialized even if the segment has zero length as expected by _cairo_stroker_line_to_dashed.
2006-04-13Move calculation of slope outside of _cairo_stroker_add_sub_edge.Jeff Muizelaar1-7/+12
This makes the slope calculation more accurate for dashed lines by computing it once for the entire line instead for each individual dash segment. It also adjusts stroker_line_to() to match the new convention for stroker_add_sub_edge().
2006-04-13Check for zero length dashed lines.Jeff Muizelaar1-1/+9
This makes line_to_dashed more like line_to by returning immediately on degenerate paths. This is needed so that we can do the slope calculation for the entire line.
2006-04-13Fix page numbers in PostScript output to start at 1Carl Worth1-1/+2
2006-04-12Optimize PostScript file size with procedures instead of builtin operators.Carl Worth1-15/+27
This is based on a suggestion by Michael Sweet.
2006-04-12Add simple word wrapping to keep PostScript output within 80 columns or less.Carl Worth1-0/+109
2006-04-12Merge branch 'ps-type3' into cairo (no bitmap support for type 3 yet).Carl Worth1-297/+440
Conflicts: src/cairo-hash.c src/cairo-ps-surface.c
2006-04-12Add documentation for _cairo_output_stream_create_for_file.Carl Worth1-0/+7
2006-04-12Propagate stream status values through _cairo_ps_surface_finishCarl Worth1-2/+7
2006-04-12Use ferror to get error checking for stdio-based output streams.Carl Worth1-3/+8
2006-04-12Fix missing argument to printf in _cairo_ps_surface_stat_pageCarl Worth1-2/+3