Debian Codegraph @

doc/defuns-cairo-pdf.xml.texi

raw
1
2 @c %start of fragment
3
4 @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 >})
5 Creates a PDF surface of the specified size in points to be written to
6 @var{filename}. If @var{filename} is not given, the output is sent to
7 the current output port.
8
9
10 @table @var
11 @item filename
12 a filename for the PDF output (must be writable), @samp{@code{#f}} may
13 be used to specify no output. This will generate a PDF surface that may
14 be queried and used as a source, without generating a temporary file.
15
16 @item width-in-points
17 width of the surface, in points (1 point == 1/72.0 inch)
18
19 @item height-in-points
20 height of the surface, in points (1 point == 1/72.0 inch)
21
22 @item ret
23 a pointer to the newly created surface. The caller owns the surface and
24 should call @code{cairo-surface-destroy} when done with it. This
25 function always returns a valid pointer, but it will return a pointer to
26 a "nil" surface if an error such as out of memory occurs. You can use
27 @code{cairo-surface-status} to check for this.
28
29 @end table
30
31 Since 1.2
32
33 @end deffn
34
35 @deffn Function cairo-pdf-get-versions @result{}@tie{} (@var{versions}@tie{}@code{<cairo-pdf-version-t const*>}) (@var{num-versions}@tie{}@code{<int>})
36 Used to retrieve the list of supported versions. See
37 @code{cairo-pdf-surface-restrict-to-version}.
38
39 @table @var
40 @item versions
41 supported version list
42
43 @item num-versions
44 list length
45
46 @end table
47
48 Since 1.10
49
50 @end deffn
51
52 @deffn Function cairo-pdf-surface-set-size (@var{surface}@tie{}@code{<cairo-surface-t>}) (@var{width-in-points}@tie{}@code{<double>}) (@var{height-in-points}@tie{}@code{<double>})
53 Changes the size of a PDF surface for the current (and subsequent)
54 pages.
55
56 This function should only be called before any drawing operations have
57 been performed on the current page. The simplest way to do this is to
58 call this function immediately after creating the surface or immediately
59 after completing a page with either @code{cairo-show-page} or
60 @code{cairo-copy-page}.
61
62 @table @var
63 @item surface
64 a PDF @code{<cairo-surface-t>}
65
66 @item width-in-points
67 new surface width, in points (1 point == 1/72.0 inch)
68
69 @item height-in-points
70 new surface height, in points (1 point == 1/72.0 inch)
71
72 @end table
73
74 Since 1.2
75
76 @end deffn
77
78
79 @c %end of fragment