The OpenD Programming Language

1 /**
2  *
3  * License:
4  * $(TABLE
5  *   $(TR $(TD cairoD wrapper/bindings)
6  *     $(TD $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)))
7  *   $(TR $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING, _cairo))
8  *     $(TD $(LINK2 http://cgit.freedesktop.org/cairo/tree/COPYING-LGPL-2.1, LGPL 2.1) /
9  *     $(LINK2 http://cgit.freedesktop.org/cairo/plain/COPYING-MPL-1.1, MPL 1.1)))
10  * )
11  * Authors:
12  * $(TABLE
13  *   $(TR $(TD Johannes Pfau) $(TD cairoD))
14  *   $(TR $(TD $(LINK2 http://cairographics.org, _cairo team)) $(TD _cairo))
15  * )
16  */
17 /*
18  * Distributed under the Boost Software License, Version 1.0.
19  *    (See accompanying file LICENSE_1_0.txt or copy at
20  *          http://www.boost.org/LICENSE_1_0.txt)
21  */
22 module cairo.c.ps;
23 
24 import cairo.c.cairo;
25 
26 static if(CAIRO_HAS_PS_SURFACE)
27 {
28     extern(C):
29 
30     /* PS-surface functions */
31     /**
32      * $(D cairo_ps_level_t) is used to describe the language level of the
33      * PostScript Language Reference that a generated PostScript file will
34      * conform to.
35      */
36     enum cairo_ps_level_t
37     {
38         ///The language level 2 of the PostScript specification.
39         CAIRO_PS_LEVEL_2,
40         ///The language level 3 of the PostScript specification.
41         CAIRO_PS_LEVEL_3
42     }
43     ///
44     cairo_surface_t* cairo_ps_surface_create (const (char*) filename,
45                  double             width_in_points,
46                  double             height_in_points);
47     ///
48     cairo_surface_t* cairo_ps_surface_create_for_stream (cairo_write_func_t write_func,
49                         void*         closure,
50                         double        width_in_points,
51                         double        height_in_points);
52     ///
53     void cairo_ps_surface_restrict_to_level (cairo_surface_t* surface,
54                                         cairo_ps_level_t    level);
55     ///
56     void cairo_ps_get_levels (immutable(cairo_ps_level_t*)*  levels,
57                          int*    num_levels);
58     ///
59     immutable(char)* cairo_ps_level_to_string (cairo_ps_level_t level);
60     ///
61     void cairo_ps_surface_set_eps (cairo_surface_t*    surface,
62                   cairo_bool_t           eps);
63     ///
64     cairo_bool_t cairo_ps_surface_get_eps (cairo_surface_t    *surface);
65     ///
66     void cairo_ps_surface_set_size (cairo_surface_t* surface,
67                    double         width_in_points,
68                    double         height_in_points);
69     ///
70     void cairo_ps_surface_dsc_comment (cairo_surface_t*  surface,
71                       const(char*)    comment);
72     ///
73     void cairo_ps_surface_dsc_begin_setup (cairo_surface_t *surface);
74     ///
75     void cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface);
76 }
77 else
78 {
79     //static assert(false, "CairoD was not compiled with support for the ps backend");
80 }