|
||||
File indexing completed on 2025-01-18 09:54:03
0001 /* cairo - a vector graphics library with display and print output 0002 * 0003 * Copyright © 2002 University of Southern California 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it either under the terms of the GNU Lesser General Public 0007 * License version 2.1 as published by the Free Software Foundation 0008 * (the "LGPL") or, at your option, under the terms of the Mozilla 0009 * Public License Version 1.1 (the "MPL"). If you do not alter this 0010 * notice, a recipient may use your version of this file under either 0011 * the MPL or the LGPL. 0012 * 0013 * You should have received a copy of the LGPL along with this library 0014 * in the file COPYING-LGPL-2.1; if not, write to the Free Software 0015 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA 0016 * You should have received a copy of the MPL along with this library 0017 * in the file COPYING-MPL-1.1 0018 * 0019 * The contents of this file are subject to the Mozilla Public License 0020 * Version 1.1 (the "License"); you may not use this file except in 0021 * compliance with the License. You may obtain a copy of the License at 0022 * http://www.mozilla.org/MPL/ 0023 * 0024 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY 0025 * OF ANY KIND, either express or implied. See the LGPL or the MPL for 0026 * the specific language governing rights and limitations. 0027 * 0028 * The Original Code is the cairo graphics library. 0029 * 0030 * The Initial Developer of the Original Code is University of Southern 0031 * California. 0032 * 0033 * Contributor(s): 0034 * Carl D. Worth <cworth@cworth.org> 0035 */ 0036 0037 #ifndef CAIRO_PDF_H 0038 #define CAIRO_PDF_H 0039 0040 #include "cairo.h" 0041 0042 #if CAIRO_HAS_PDF_SURFACE 0043 0044 CAIRO_BEGIN_DECLS 0045 0046 /** 0047 * cairo_pdf_version_t: 0048 * @CAIRO_PDF_VERSION_1_4: The version 1.4 of the PDF specification. (Since 1.10) 0049 * @CAIRO_PDF_VERSION_1_5: The version 1.5 of the PDF specification. (Since 1.10) 0050 * 0051 * #cairo_pdf_version_t is used to describe the version number of the PDF 0052 * specification that a generated PDF file will conform to. 0053 * 0054 * Since: 1.10 0055 **/ 0056 typedef enum _cairo_pdf_version { 0057 CAIRO_PDF_VERSION_1_4, 0058 CAIRO_PDF_VERSION_1_5 0059 } cairo_pdf_version_t; 0060 0061 cairo_public cairo_surface_t * 0062 cairo_pdf_surface_create (const char *filename, 0063 double width_in_points, 0064 double height_in_points); 0065 0066 cairo_public cairo_surface_t * 0067 cairo_pdf_surface_create_for_stream (cairo_write_func_t write_func, 0068 void *closure, 0069 double width_in_points, 0070 double height_in_points); 0071 0072 cairo_public void 0073 cairo_pdf_surface_restrict_to_version (cairo_surface_t *surface, 0074 cairo_pdf_version_t version); 0075 0076 cairo_public void 0077 cairo_pdf_get_versions (cairo_pdf_version_t const **versions, 0078 int *num_versions); 0079 0080 cairo_public const char * 0081 cairo_pdf_version_to_string (cairo_pdf_version_t version); 0082 0083 cairo_public void 0084 cairo_pdf_surface_set_size (cairo_surface_t *surface, 0085 double width_in_points, 0086 double height_in_points); 0087 0088 /** 0089 * cairo_pdf_outline_flags_t: 0090 * @CAIRO_PDF_OUTLINE_FLAG_OPEN: The outline item defaults to open in the PDF viewer (Since 1.16) 0091 * @CAIRO_PDF_OUTLINE_FLAG_BOLD: The outline item is displayed by the viewer in bold text (Since 1.16) 0092 * @CAIRO_PDF_OUTLINE_FLAG_ITALIC: The outline item is displayed by the viewer in italic text (Since 1.16) 0093 * 0094 * #cairo_pdf_outline_flags_t is used by the 0095 * cairo_pdf_surface_add_outline() function specify the attributes of 0096 * an outline item. These flags may be bitwise-or'd to produce any 0097 * combination of flags. 0098 * 0099 * Since: 1.16 0100 **/ 0101 typedef enum _cairo_pdf_outline_flags { 0102 CAIRO_PDF_OUTLINE_FLAG_OPEN = 0x1, 0103 CAIRO_PDF_OUTLINE_FLAG_BOLD = 0x2, 0104 CAIRO_PDF_OUTLINE_FLAG_ITALIC = 0x4, 0105 } cairo_pdf_outline_flags_t; 0106 0107 #define CAIRO_PDF_OUTLINE_ROOT 0 0108 0109 cairo_public int 0110 cairo_pdf_surface_add_outline (cairo_surface_t *surface, 0111 int parent_id, 0112 const char *utf8, 0113 const char *link_attribs, 0114 cairo_pdf_outline_flags_t flags); 0115 0116 /** 0117 * cairo_pdf_metadata_t: 0118 * @CAIRO_PDF_METADATA_TITLE: The document title (Since 1.16) 0119 * @CAIRO_PDF_METADATA_AUTHOR: The document author (Since 1.16) 0120 * @CAIRO_PDF_METADATA_SUBJECT: The document subject (Since 1.16) 0121 * @CAIRO_PDF_METADATA_KEYWORDS: The document keywords (Since 1.16) 0122 * @CAIRO_PDF_METADATA_CREATOR: The document creator (Since 1.16) 0123 * @CAIRO_PDF_METADATA_CREATE_DATE: The document creation date (Since 1.16) 0124 * @CAIRO_PDF_METADATA_MOD_DATE: The document modification date (Since 1.16) 0125 * 0126 * #cairo_pdf_metadata_t is used by the 0127 * cairo_pdf_surface_set_metadata() function specify the metadata to set. 0128 * 0129 * Since: 1.16 0130 **/ 0131 typedef enum _cairo_pdf_metadata { 0132 CAIRO_PDF_METADATA_TITLE, 0133 CAIRO_PDF_METADATA_AUTHOR, 0134 CAIRO_PDF_METADATA_SUBJECT, 0135 CAIRO_PDF_METADATA_KEYWORDS, 0136 CAIRO_PDF_METADATA_CREATOR, 0137 CAIRO_PDF_METADATA_CREATE_DATE, 0138 CAIRO_PDF_METADATA_MOD_DATE, 0139 } cairo_pdf_metadata_t; 0140 0141 cairo_public void 0142 cairo_pdf_surface_set_metadata (cairo_surface_t *surface, 0143 cairo_pdf_metadata_t metadata, 0144 const char *utf8); 0145 0146 cairo_public void 0147 cairo_pdf_surface_set_page_label (cairo_surface_t *surface, 0148 const char *utf8); 0149 0150 cairo_public void 0151 cairo_pdf_surface_set_thumbnail_size (cairo_surface_t *surface, 0152 int width, 0153 int height); 0154 0155 CAIRO_END_DECLS 0156 0157 #else /* CAIRO_HAS_PDF_SURFACE */ 0158 # error Cairo was not compiled with support for the pdf backend 0159 #endif /* CAIRO_HAS_PDF_SURFACE */ 0160 0161 #endif /* CAIRO_PDF_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |