summaryrefslogtreecommitdiff
path: root/src/cairo-pdf.h
Commit message (Collapse)AuthorAgeFilesLines
* pdf: ensure filenames are correctly encodedAdrian Johnson2022-01-161-1/+5
|
* Add cairo_pdf_surface_set_custom_metadata()Adrian Johnson2021-08-221-0/+5
|
* pdf: use link attributes instead of dest name for cairo_pdf_surface_add_outlineAdrian Johnson2017-08-261-1/+1
| | | | | In PDF outline targets are specified the same way as link targets so there is no need to restrict the target to dest names.
* pdf: Fix wrong cairo_pdf_outline_flags_t item prefixKouhei Sutou2017-01-051-6/+6
|
* pdf: Remove duplicated itemKouhei Sutou2017-01-051-1/+0
|
* fix make checkAdrian Johnson2016-10-041-3/+3
|
* pdf: thumbnail APIAdrian Johnson2016-10-011-0/+5
|
* pdf: page label APIAdrian Johnson2016-10-011-0/+4
|
* pdf: metadata APIAdrian Johnson2016-10-011-0/+31
|
* pdf: add document outline APIAdrian Johnson2016-10-011-0/+28
|
* Revert accidental push of ps debugging API.Chris Wilson2012-04-141-5/+0
| | | | | | | | | | This reverts commits 6ad8c96fd81e06cea6ada4a83e7c5614f150f914, a3f97d1d2e77a0fee4ca03d5dc9968952a440561, 25abe582982caeb07d1e0af4acca53bb110a33bf I should know better by now than to push without checking for outstanding changes.
* pdf (debug API): Export the ability to force fallbacksChris Wilson2012-04-121-0/+5
| | | | | | | | | We need to occasionally force fallbacks whilst testing the PDF output, so export a debug interface to do so in order to avoid poking around inside cairo internals. References: https://bugs.freedesktop.org/show_bug.cgi?id=48577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
* doc: Add since documentation for enumeration valuesAndrea Canciani2012-03-291-2/+2
|
* doc: Add "since" tag to documentationAndrea Canciani2012-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following Python script was used to compute "Since: 1.X" tags, based on the first version where a symbol became officially supported. This script requires a concatenation of the the cairo public headers for the officially supported beckends to be available as "../../includes/1.X.0.h". from sys import argv import re syms = {} def stripcomments(text): def replacer(match): s = match.group(0) if s.startswith('/'): return "" else: return s pattern = re.compile( r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', re.DOTALL | re.MULTILINE ) return re.sub(pattern, replacer, text) for minor in range(12,-2,-2): version = "1.%d" % minor names = re.split('([A-Za-z0-9_]+)', stripcomments(open("../../includes/%s.0.h" % version).read())) for s in names: syms[s] = version for filename in argv[1:]: is_public = False lines = open(filename, "r").read().split("\n") newlines = [] for i in range(len(lines)): if lines[i] == "/**": last_sym = lines[i+1][2:].strip().replace(":", "") is_public = last_sym.lower().startswith("cairo") elif is_public and lines[i] == " **/": if last_sym in syms: v = syms[last_sym] if re.search("Since", newlines[-1]): newlines = newlines[:-1] if newlines[-1].strip() != "*": newlines.append(" *") newlines.append(" * Since: %s" % v) else: print "%s (%d): Cannot determine the version in which '%s' was introduced" % (filename, i, last_sym) newlines.append(lines[i]) out = open(filename, "w") out.write("\n".join(newlines)) out.close()
* doc: Make documentation comments symmetricAndrea Canciani2012-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Documentation comments should always start with "/**" and end with "**/". This is not required by gtk-doc, but it makes the documentations formatting more consistent and simplifies the checking of documentation comments. The following Python script tries to enforce this. from sys import argv from sre import search for filename in argv[1:]: in_doc = False lines = open(filename, "r").read().split("\n") for i in range(len(lines)): ls = lines[i].strip() if ls == "/**": in_doc = True elif in_doc and ls == "*/": lines[i] = " **/" if ls.endswith("*/"): in_doc = False out = open(filename, "w") out.write("\n".join(lines)) out.close() This fixes most 'documentation comment not closed with **/' warnings by check-doc-syntax.awk.
* Update FSF addressAndrea Canciani2010-04-271-1/+1
| | | | | | | | | | | I updated the Free Software Foundation address using the following script. for i in $(git grep Temple | cut -d: -f1 ) do sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i" done Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
* Document PDF restrict_to_version APIAdrian Johnson2008-12-231-0/+2
|
* PDF: Add cairo_pdf_surface_restrict_to_version APIAdrian Johnson2008-11-241-0/+24
| | | | | Now that we are using PDF 1.5 features, add an api to select between version 1.4 or 1.5.
* Use #include "cairo-*." instead of #include <cairo-*.h>Behdad Esfahbod2008-06-231-1/+1
| | | | | The rule is simple: <x.h> for system / other project includes, "x.h" for local includes.
* cairo-pdf.h: Add missing cairo_public decoratorsBehdad Esfahbod2006-09-181-1/+1
|
* New API: Replace cairo_{ps,pdf,svg}_set_dpi with new ↵Carl Worth2006-06-091-5/+0
| | | | | | | | | cairo_surface_set_fallback_resolution. This just provides the mechanics for storing the value and removing the old function calls. The new value is still not used anywhere (though nor where the old values), so there should be no functional change (other than forcing any programs calling the old API to be updated).
* PDF: Add new cairo_pdf_surface_set_size for doing per-page size changesCarl Worth2006-05-031-0/+5
|
* Rip the cairo_content_t argument out of ps/pdf_surface_create as per ↵Carl Worth2006-01-191-2/+0
| | | | | | | | 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.
* Change documentation to recommend cairo_paint rather than ↵Carl Worth2006-01-181-0/+2
| | | | | | | | 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.
* Big change to the test infrastructure and supporting internals. The goal now ↵Carl Worth2006-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | 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).
* Give cairo_public an empty definition by default.Carl Worth2005-09-071-3/+3
| | | | Add new cairo_public macro before every public function call prototype.
* Remove destroy_closure from cairo_output_stream_t interface.Carl Worth2005-05-171-9/+8
| | | | | | | Remove destroy_closure argument from cairo_pdf_surface_create_for_stream. Rename width,height to width_in_points, height_in_points for better clarity. Brush a bunch of dust off of the PS backend and bring it up to date with the latest API conventions from the PDF backend. These include: accepting a filename rather than a FILE in the primary constructor, providing a stream-based interface for more flexibility, and accepting a surface size in device-space units (points) rather than inches. Make it a little more clear that the width and height being passed around are in units of points. Update to the latest cairo-ps.h changes as described above. Notice how much more sane things become now that the surface size is described in device-space units.
* Take a filename instead of a FILE pointer.Kristian Høgsberg2005-05-161-6/+4
|
* Add an #error if cairo-foo.h is included when cairo was compiled without ↵Carl Worth2005-05-141-0/+3
| | | | support for the foo backend.
* Rename cairo_pdf_surface_create_for_callback() to ↵Kristian Høgsberg2005-05-131-11/+12
| | | | cairo_pdf_surface_create_for_stream(), and change PDF constructors to take width and height as points and move PPI setting to cairo_pdf_surface_set_ppi()
* Change definitions of everything in cairo-features.h to prefer #if over #ifdef.Carl Worth2005-05-061-1/+1
| | | | | Track #ifdef -> #if changes. Add support to automatically change all #ifdef CAIRO_HAS to #if CAIRO_HAS.
* Remove cairo_set_target_surface and all other backend-specific ↵Carl Worth2005-05-061-18/+0
| | | | | | | cairo_set_target functions. Require a cairo_surface_t* to call cairo_create. Port to use new cairo_create interface. Rewrite all tests that were using cairo_set_target_surface to instead create a temporary cairo_t, (eventually to be replaced with cairo_begin_group).
* New PNG utility functions.Kristian Høgsberg2005-03-281-26/+26
| | | | Reverse the naming of the pdf constructors so the callback based ones have the long names.
* Add cairo_output_stream.cKristian Høgsberg2005-03-161-11/+29
| | | | | | | | | | Add new errors, CAIRO_STATUS_WRITE_ERROR and CAIRO_STATUS_SURFACE_FINISHED, add cairo_surface_finish() prototype, add cairo_write_func_t. Add strings for new errors, documentation fix. Rename surface destroy functions to finish and change them to not free the surface. Change PDF surface constructors to take a write function in the general case and add stdio convenience constructors. Change destroy function to finish for cairo_pdf_surface. Change implementation to use cairo_output_stream_t functions for output. Use _cairo_surface_show_glyphs instead of calling function pointer directly. Add prototypes for cairo output stream functions, rename destroy to finish in cairo_surface_backend_t and add finished flag to cairo_surface_t. Add cairo_surface_finish() and call it from cairo_surface_destroy(). Check the finished flag in cairo_surface_t in functions that change the surface.
* Switch from broken cworth@isi.edu address to canonical cworth@cworth.org ↵Carl Worth2005-02-221-1/+1
| | | | address.
* Change cairo_font_t to refer to a font scaled to a particular output device ↵Owen Taylor2005-01-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | | resolution. src/cairoint.h src/cairo_font.c src/cairo_ft_font.c src/cairo_xlib_surface.c src/cairo_pdf_surface.c src/cairo_gstate.c src/cairo.c: Switch many internal methods from handling cairo_unscaled_font_t and cairo_font_scale_t pairs to handling cairo_font_t. src/cairo-ft-private.h src/cairo_ft_fontc: Add some internal interfaces for use by the FreeType backend. Clear the gstate's current font when the transform or target surface changes. src/cairo.h src/cairo_ft_font.c: Rename cairo_ft_font_pattern to cairo_ft_font_get_pattern(). src/cairo.h src/cairo_ft_font.c: Make cairo_ft_font_create() and cairo_ft_font_create_for_ft_face() take a font scale; make the latter take load_flags for FT_Load_Glyph() as well. Change cairo_ft_font_face() to Xft-style cairo_ft_font_lock_face, cairo_ft_font_unlock_face. Remove the name/slant/weight=>unscaled font cache, it didn't work with the new cairo_font_t setup. If it turns out to be needed, it can be added back in some other form. src/cairoint.h src/cairo_font.c: Add a 'flags' field to cairo_glyph_cache_key_t, we use it for load flags with freetype backend. Switch the caching to be from resolved fontconfig pattern => file; keep only a fixed number of FT_Face objects open at once, similar to FreeType. src/cairo_gstate.c src/cairoint.h: Add public cairo_font_glyph_extents, use it to implement _cairo_gstate_glyph_extents(). Add refcounting for glyph cache elements; there was an bug where elements got ejected from the cache and freed before they could be used. src/cairoint.h src/cairo_cache.c (_cairo_cache_random_entry()) New function to return a random entry in the cache matching a predicate; reuse the internals for the previous _random_live_entry(). src/cairoint.h src/cairo_cache.c (_cairo_cache_lookup()): Add an optional created_entry return value. src/cairo_ft_font.c src/cairo_xlib_surface.c: Adapt to _cairo_cache_lookup() change. Support max_memory == 0 to indicate an unbounded cache. src/cairoint.h src/cairo_cache.c (_cairo_cache_remove()): Add a function to manually remove entries from the cache. Update for changes, document cairo_matrix_t, cairo_glyph_t, etc. src/cairo.h src/cairo-atsui.h src/cairo-ft.h src/cairo-glitz.h src/cairo-pdf.h src/cairo-png.h src/cairo-ps.h src/cairo-quartz.h src/cairo-xcb.h src/cairo-xlib.h: Add CAIRO_BEGIN/END_DECLS for extern "C", use it on all public headers. Move header guards outermost. Fix encoding.
* Track various renamings.Carl Worth2005-01-201-0/+62
Insert new includes for backend-specific header files. Remove redundant include of cairo-features.h. Rename header-exclusion macro from _CAIRO_H_ to CAIRO_H. Remove platform-specific grubbing for cairo-features.h and pixman.h in odd places. Remove all backend-specific prototypes, (as they are now in their own header files). Remove deprecated Remove printf. Convert to utf-8. Use the proper name for multiple-header exclusion (CAIRO_FEATURES_H). Track rename of FREETYPE_FONT_FEATURE to FT_FONT_FEATURE. Split cairo.h up into cairo.h, cairo-ft.h, cairo-glitz.h, cairo-pdf.h, cairo-png.h, cairo-ps.h, cairo-xcb.h, cairo-xlib.h. Update for rename of cairo_wideint.h to cairo-wideint.h. Rename CAIRO_HAS_FREETYPE_FONT to CAIRO_HAS_FT_FONT, (to match cairo_ft_font functions and cairo-ft.h). Update for public header files now in /cairo.