|
||||
File indexing completed on 2025-01-18 09:54:03
0001 /* cairo - a vector graphics library with display and print output 0002 * 0003 * cairo-svg.h 0004 * 0005 * Copyright © 2005 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr> 0006 * 0007 * This library is free software; you can redistribute it and/or 0008 * modify it either under the terms of the GNU Lesser General Public 0009 * License version 2.1 as published by the Free Software Foundation 0010 * (the "LGPL") or, at your option, under the terms of the Mozilla 0011 * Public License Version 1.1 (the "MPL"). If you do not alter this 0012 * notice, a recipient may use your version of this file under either 0013 * the MPL or the LGPL. 0014 * 0015 * You should have received a copy of the LGPL along with this library 0016 * in the file COPYING-LGPL-2.1; if not, write to the Free Software 0017 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA 0018 * You should have received a copy of the MPL along with this library 0019 * in the file COPYING-MPL-1.1 0020 * 0021 * The contents of this file are subject to the Mozilla Public License 0022 * Version 1.1 (the "License"); you may not use this file except in 0023 * compliance with the License. You may obtain a copy of the License at 0024 * http://www.mozilla.org/MPL/ 0025 * 0026 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY 0027 * OF ANY KIND, either express or implied. See the LGPL or the MPL for 0028 * the specific language governing rights and limitations. 0029 * 0030 */ 0031 0032 #ifndef CAIRO_SVG_H 0033 #define CAIRO_SVG_H 0034 0035 #include "cairo.h" 0036 0037 #if CAIRO_HAS_SVG_SURFACE 0038 0039 CAIRO_BEGIN_DECLS 0040 0041 /** 0042 * cairo_svg_version_t: 0043 * @CAIRO_SVG_VERSION_1_1: The version 1.1 of the SVG specification. (Since 1.2) 0044 * @CAIRO_SVG_VERSION_1_2: The version 1.2 of the SVG specification. (Since 1.2) 0045 * 0046 * #cairo_svg_version_t is used to describe the version number of the SVG 0047 * specification that a generated SVG file will conform to. 0048 * 0049 * Since: 1.2 0050 **/ 0051 typedef enum _cairo_svg_version { 0052 CAIRO_SVG_VERSION_1_1, 0053 CAIRO_SVG_VERSION_1_2 0054 } cairo_svg_version_t; 0055 0056 /** 0057 * cairo_svg_unit_t: 0058 * 0059 * @CAIRO_SVG_UNIT_USER: User unit, a value in the current coordinate system. 0060 * If used in the root element for the initial coordinate systems it 0061 * corresponds to pixels. (Since 1.16) 0062 * @CAIRO_SVG_UNIT_EM: The size of the element's font. (Since 1.16) 0063 * @CAIRO_SVG_UNIT_EX: The x-height of the element’s font. (Since 1.16) 0064 * @CAIRO_SVG_UNIT_PX: Pixels (1px = 1/96th of 1in). (Since 1.16) 0065 * @CAIRO_SVG_UNIT_IN: Inches (1in = 2.54cm = 96px). (Since 1.16) 0066 * @CAIRO_SVG_UNIT_CM: Centimeters (1cm = 96px/2.54). (Since 1.16) 0067 * @CAIRO_SVG_UNIT_MM: Millimeters (1mm = 1/10th of 1cm). (Since 1.16) 0068 * @CAIRO_SVG_UNIT_PT: Points (1pt = 1/72th of 1in). (Since 1.16) 0069 * @CAIRO_SVG_UNIT_PC: Picas (1pc = 1/6th of 1in). (Since 1.16) 0070 * @CAIRO_SVG_UNIT_PERCENT: Percent, a value that is some fraction of another 0071 * reference value. (Since 1.16) 0072 * 0073 * #cairo_svg_unit_t is used to describe the units valid for coordinates and 0074 * lengths in the SVG specification. 0075 * 0076 * See also: 0077 * https://www.w3.org/TR/SVG/coords.html#Units 0078 * https://www.w3.org/TR/SVG/types.html#DataTypeLength 0079 * https://www.w3.org/TR/css-values-3/#lengths 0080 * 0081 * Since: 1.16 0082 **/ 0083 typedef enum _cairo_svg_unit { 0084 CAIRO_SVG_UNIT_USER = 0, 0085 CAIRO_SVG_UNIT_EM, 0086 CAIRO_SVG_UNIT_EX, 0087 CAIRO_SVG_UNIT_PX, 0088 CAIRO_SVG_UNIT_IN, 0089 CAIRO_SVG_UNIT_CM, 0090 CAIRO_SVG_UNIT_MM, 0091 CAIRO_SVG_UNIT_PT, 0092 CAIRO_SVG_UNIT_PC, 0093 CAIRO_SVG_UNIT_PERCENT 0094 } cairo_svg_unit_t; 0095 0096 cairo_public cairo_surface_t * 0097 cairo_svg_surface_create (const char *filename, 0098 double width_in_points, 0099 double height_in_points); 0100 0101 cairo_public cairo_surface_t * 0102 cairo_svg_surface_create_for_stream (cairo_write_func_t write_func, 0103 void *closure, 0104 double width_in_points, 0105 double height_in_points); 0106 0107 cairo_public void 0108 cairo_svg_surface_restrict_to_version (cairo_surface_t *surface, 0109 cairo_svg_version_t version); 0110 0111 cairo_public void 0112 cairo_svg_get_versions (cairo_svg_version_t const **versions, 0113 int *num_versions); 0114 0115 cairo_public const char * 0116 cairo_svg_version_to_string (cairo_svg_version_t version); 0117 0118 cairo_public void 0119 cairo_svg_surface_set_document_unit (cairo_surface_t *surface, 0120 cairo_svg_unit_t unit); 0121 0122 cairo_public cairo_svg_unit_t 0123 cairo_svg_surface_get_document_unit (cairo_surface_t *surface); 0124 0125 CAIRO_END_DECLS 0126 0127 #else /* CAIRO_HAS_SVG_SURFACE */ 0128 # error Cairo was not compiled with support for the svg backend 0129 #endif /* CAIRO_HAS_SVG_SURFACE */ 0130 0131 #endif /* CAIRO_SVG_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |