Debian Codegraph @

doc/overrides.texi

raw
1 @c See COPYING.docs for copyright information.
2
3 @deffn Function cairo-create (@var{target} @code{<cairo-surface-t>}) @result{} (@var{ret} @code{<cairo-t>})
4 Creates a new @code{<cairo-t>} with all graphics state parameters set to default
5 values and with @var{target} as a target surface. The target surface should be
6 constructed with a backend-specific function such as
7 @code{cairo-image-surface-create} (or any other
8 @samp{cairo_<backend>_surface_create} variant).
9
10 @table @var
11 @item target
12 target surface for the context
13
14 @item ret
15 a newly allocated @code{<cairo-t>}.
16 @end table
17
18 @end deffn
19
20 @c order of arguments is [width height filename].
21 @c filename is optional.
22
23 @deffn Function cairo-svg-surface-create (@var{width-in-points}@tie{}@code{<double>}) (@var{height-in-points}@tie{}@code{<double>}) [(@var{filename}@tie{}@code{<char>})] @result{}@tie{} (@var{ret}@tie{}@code{<cairo-surface-t >})
24 Creates a SVG surface of the specified size in points to be written to
25 @var{filename}. If @var{filename} is not given, the output is sent to
26 the current output port.
27
28 The SVG surface backend recognizes the following MIME types for the data
29 attached to a surface (see @code{cairo-surface-set-mime-data}) when it
30 is used as a source pattern for drawing on this surface:
31 @samp{CAIRO_MIME_TYPE_JPEG}, @samp{CAIRO_MIME_TYPE_PNG},
32 @samp{CAIRO_MIME_TYPE_URI}. If any of them is specified, the SVG backend
33 emits a href with the content of MIME data instead of a surface snapshot
34 (PNG, Base64-encoded) in the corresponding image tag.
35
36 The unofficial MIME type @samp{CAIRO_MIME_TYPE_URI} is examined first.
37 If present, the URI is emitted as is: assuring the correctness of URI is
38 left to the client code.
39
40 If @samp{CAIRO_MIME_TYPE_URI} is not present, but
41 @samp{CAIRO_MIME_TYPE_JPEG} or @samp{CAIRO_MIME_TYPE_PNG} is specified,
42 the corresponding data is Base64-encoded and emitted.
43
44 @table @var
45 @item filename
46 a filename for the SVG output (must be writable), @samp{@code{#f}} may
47 be used to specify no output. This will generate a SVG surface that may
48 be queried and used as a source, without generating a temporary file.
49
50 @item width-in-points
51 width of the surface, in points (1 point == 1/72.0 inch)
52
53 @item height-in-points
54 height of the surface, in points (1 point == 1/72.0 inch)
55
56 @item ret
57 a pointer to the newly created surface. The caller owns the surface and
58 should call @code{cairo-surface-destroy} when done with it. This
59 function always returns a valid pointer, but it will return a pointer to
60 a "nil" surface if an error such as out of memory occurs. You can use
61 @code{cairo-surface-status} to check for this.
62
63 @end table
64
65 Since 1.2
66
67 @end deffn
68
69 @c order of arguments is [width height filename].
70 @c filename is optional.
71
72 @deffn Function cairo-pdf-surface-create (@var{width-in-points}@tie{}@code{<double>}) (@var{height-in-points}@tie{}@code{<double>}) [(@var{filename}@tie{}@code{<char>})] @result{}@tie{} (@var{ret}@tie{}@code{<cairo-surface-t >})
73 Creates a PDF surface of the specified size in points to be written to
74 @var{filename}. If @var{filename} is not given, the output is sent to
75 the current output port.
76
77
78 @table @var
79 @item filename
80 a filename for the PDF output (must be writable), @samp{@code{#f}} may
81 be used to specify no output. This will generate a PDF surface that may
82 be queried and used as a source, without generating a temporary file.
83
84 @item width-in-points
85 width of the surface, in points (1 point == 1/72.0 inch)
86
87 @item height-in-points
88 height of the surface, in points (1 point == 1/72.0 inch)
89
90 @item ret
91 a pointer to the newly created surface. The caller owns the surface and
92 should call @code{cairo-surface-destroy} when done with it. This
93 function always returns a valid pointer, but it will return a pointer to
94 a "nil" surface if an error such as out of memory occurs. You can use
95 @code{cairo-surface-status} to check for this.
96
97 @end table
98
99 Since 1.2
100
101 @end deffn
102
103 @c order of arguments is [width height filename].
104
105 @deffn Function cairo-ps-surface-create (@var{width-in-points}@tie{}@code{<double>}) (@var{height-in-points}@tie{}@code{<double>}) (@var{filename}@tie{}@code{<char>}) @result{}@tie{} (@var{ret}@tie{}@code{<cairo-surface-t >})
106 Creates a PostScript surface of the specified size in points to be
107 written to @var{filename}. See @code{cairo-ps-surface-create-for-stream}
108 for a more flexible mechanism for handling the PostScript output than
109 simply writing it to a named file.
110
111 Note that the size of individual pages of the PostScript output can
112 vary. See @code{cairo-ps-surface-set-size}.
113
114 @table @var
115 @item filename
116 a filename for the PS output (must be writable), @samp{@code{#f}} may be
117 used to specify no output. This will generate a PS surface that may be
118 queried and used as a source, without generating a temporary file.
119
120 @item width-in-points
121 width of the surface, in points (1 point == 1/72.0 inch)
122
123 @item height-in-points
124 height of the surface, in points (1 point == 1/72.0 inch)
125
126 @item ret
127 a pointer to the newly created surface. The caller owns the surface and
128 should call @code{cairo-surface-destroy} when done with it. This
129 function always returns a valid pointer, but it will return a pointer to
130 a "nil" surface if an error such as out of memory occurs. You can use
131 @code{cairo-surface-status} to check for this.
132
133 @end table
134
135 Since 1.2
136
137 @end deffn