Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
cairo-svg.h
Go to the documentation of this file.
1/* cairo - a vector graphics library with display and print output
2 *
3 * cairo-svg.h
4 *
5 * Copyright © 2005 Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it either under the terms of the GNU Lesser General Public
9 * License version 2.1 as published by the Free Software Foundation
10 * (the "LGPL") or, at your option, under the terms of the Mozilla
11 * Public License Version 1.1 (the "MPL"). If you do not alter this
12 * notice, a recipient may use your version of this file under either
13 * the MPL or the LGPL.
14 *
15 * You should have received a copy of the LGPL along with this library
16 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
18 * You should have received a copy of the MPL along with this library
19 * in the file COPYING-MPL-1.1
20 *
21 * The contents of this file are subject to the Mozilla Public License
22 * Version 1.1 (the "License"); you may not use this file except in
23 * compliance with the License. You may obtain a copy of the License at
24 * http://www.mozilla.org/MPL/
25 *
26 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
27 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
28 * the specific language governing rights and limitations.
29 *
30 */
31
32#ifndef CAIRO_SVG_H
33#define CAIRO_SVG_H
34
35#include "cairo.h"
36
37#if CAIRO_HAS_SVG_SURFACE
38
40
41/**
42 * cairo_svg_version_t:
43 * @CAIRO_SVG_VERSION_1_1: The version 1.1 of the SVG specification. (Since 1.2)
44 * @CAIRO_SVG_VERSION_1_2: The version 1.2 of the SVG specification. (Since 1.2)
45 *
46 * #cairo_svg_version_t is used to describe the version number of the SVG
47 * specification that a generated SVG file will conform to.
48 *
49 * Since: 1.2
50 **/
55
56/**
57 * cairo_svg_unit_t:
58 * @CAIRO_SVG_UNIT_USER: User unit, a value in the current coordinate system.
59 * If used in the root element for the initial coordinate systems it
60 * corresponds to pixels. (Since 1.16)
61 * @CAIRO_SVG_UNIT_EM: The size of the element's font. (Since 1.16)
62 * @CAIRO_SVG_UNIT_EX: The x-height of the element’s font. (Since 1.16)
63 * @CAIRO_SVG_UNIT_PX: Pixels (1px = 1/96th of 1in). (Since 1.16)
64 * @CAIRO_SVG_UNIT_IN: Inches (1in = 2.54cm = 96px). (Since 1.16)
65 * @CAIRO_SVG_UNIT_CM: Centimeters (1cm = 96px/2.54). (Since 1.16)
66 * @CAIRO_SVG_UNIT_MM: Millimeters (1mm = 1/10th of 1cm). (Since 1.16)
67 * @CAIRO_SVG_UNIT_PT: Points (1pt = 1/72th of 1in). (Since 1.16)
68 * @CAIRO_SVG_UNIT_PC: Picas (1pc = 1/6th of 1in). (Since 1.16)
69 * @CAIRO_SVG_UNIT_PERCENT: Percent, a value that is some fraction of another
70 * reference value. (Since 1.16)
71 *
72 * #cairo_svg_unit_t is used to describe the units valid for coordinates and
73 * lengths in the SVG specification.
74 *
75 * See also:
76 * - [SVG Units](https://www.w3.org/TR/SVG/coords.html#Units)
77 * - [SVG Types](https://www.w3.org/TR/SVG/types.html#DataTypeLength)
78 * - [CSS Length](https://www.w3.org/TR/css-values-3/#lengths)
79 *
80 * Since: 1.16
81 **/
94
96cairo_svg_surface_create (const char *filename,
97 double width_in_points,
98 double height_in_points);
99
102 void *closure,
103 double width_in_points,
104 double height_in_points);
105
106cairo_public void
108 cairo_svg_version_t version);
109
110cairo_public void
112 int *num_versions);
113
114cairo_public const char *
116
117cairo_public void
119 cairo_svg_unit_t unit);
120
123
125
126#else /* CAIRO_HAS_SVG_SURFACE */
127# error Cairo was not compiled with support for the svg backend
128#endif /* CAIRO_HAS_SVG_SURFACE */
129
130#endif /* CAIRO_SVG_H */
cairo_public void cairo_svg_surface_set_document_unit(cairo_surface_t *surface, cairo_svg_unit_t unit)
cairo_public const char * cairo_svg_version_to_string(cairo_svg_version_t version)
_cairo_svg_unit
Definition cairo-svg.h:82
@ CAIRO_SVG_UNIT_MM
Definition cairo-svg.h:89
@ CAIRO_SVG_UNIT_PX
Definition cairo-svg.h:86
@ CAIRO_SVG_UNIT_CM
Definition cairo-svg.h:88
@ CAIRO_SVG_UNIT_PT
Definition cairo-svg.h:90
@ CAIRO_SVG_UNIT_PERCENT
Definition cairo-svg.h:92
@ CAIRO_SVG_UNIT_PC
Definition cairo-svg.h:91
@ CAIRO_SVG_UNIT_IN
Definition cairo-svg.h:87
@ CAIRO_SVG_UNIT_EX
Definition cairo-svg.h:85
@ CAIRO_SVG_UNIT_USER
Definition cairo-svg.h:83
@ CAIRO_SVG_UNIT_EM
Definition cairo-svg.h:84
cairo_public void cairo_svg_surface_restrict_to_version(cairo_surface_t *surface, cairo_svg_version_t version)
cairo_public cairo_surface_t * cairo_svg_surface_create(const char *filename, double width_in_points, double height_in_points)
cairo_public void cairo_svg_get_versions(cairo_svg_version_t const **versions, int *num_versions)
enum _cairo_svg_unit cairo_svg_unit_t
_cairo_svg_version
Definition cairo-svg.h:51
@ CAIRO_SVG_VERSION_1_1
Definition cairo-svg.h:52
@ CAIRO_SVG_VERSION_1_2
Definition cairo-svg.h:53
cairo_public cairo_surface_t * cairo_svg_surface_create_for_stream(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points)
cairo_public cairo_svg_unit_t cairo_svg_surface_get_document_unit(cairo_surface_t *surface)
CAIRO_BEGIN_DECLS enum _cairo_svg_version cairo_svg_version_t
#define CAIRO_BEGIN_DECLS
Definition cairo.h:49
struct _cairo_surface cairo_surface_t
Definition cairo.h:164
#define CAIRO_END_DECLS
Definition cairo.h:50
#define cairo_public
Definition cairo.h:70
cairo_status_t(* cairo_write_func_t)(void *closure, const unsigned char *data, unsigned int length)
Definition cairo.h:494