1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Cairo library
4 // Author: Anthony Bretaudeau
6 // RCS-ID: $Id: cairo.h 47254 2007-08-25 10:09:52Z VS $
7 // Copyright: (c) Anthony Bretaudeau
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_CAIRO_H_BASE_
12 #define _WX_CAIRO_H_BASE_
21 #include "wx/dynlib.h"
31 static wxCairoLibrary
* Get();
32 static void CleanUp();
35 void InitializeMethods();
39 wxDynamicLibrary
*m_cairo_lib
;
41 static wxCairoLibrary
*s_lib
;
44 wxDL_METHOD_DEFINE( void, cairo_arc
,
45 (cairo_t
*cr
, double xc
, double yc
, double radius
, double angle1
, double angle2
), (cr
, xc
, yc
, radius
, angle1
, angle2
), /**/)
46 wxDL_METHOD_DEFINE( void, cairo_arc_negative
,
47 (cairo_t
*cr
, double xc
, double yc
, double radius
, double angle1
, double angle2
), (cr
, xc
, yc
, radius
, angle1
, angle2
), /**/)
48 wxDL_METHOD_DEFINE( void, cairo_clip
,
49 (cairo_t
*cr
), (cr
), /**/)
50 wxDL_METHOD_DEFINE( void, cairo_close_path
,
51 (cairo_t
*cr
), (cr
), /**/)
52 wxDL_METHOD_DEFINE( cairo_t
*, cairo_create
,
53 (cairo_surface_t
*target
), (target
), NULL
)
54 wxDL_METHOD_DEFINE( void, cairo_curve_to
,
55 (cairo_t
*cr
, double x1
, double y1
, double x2
, double y2
, double x3
, double y3
), (cr
, x1
, y1
, x2
, y2
, x3
, y3
), /**/)
56 wxDL_METHOD_DEFINE( void, cairo_destroy
,
57 (cairo_t
*cr
), (cr
), /**/)
58 wxDL_METHOD_DEFINE( void, cairo_fill
,
59 (cairo_t
*cr
), (cr
), /**/)
60 wxDL_METHOD_DEFINE( void, cairo_fill_preserve
,
61 (cairo_t
*cr
), (cr
), /**/)
62 wxDL_METHOD_DEFINE( cairo_surface_t
*, cairo_get_target
,
63 (cairo_t
*cr
), (cr
), NULL
)
64 wxDL_METHOD_DEFINE( cairo_surface_t
*, cairo_image_surface_create_for_data
,
65 (unsigned char *data
, cairo_format_t format
, int width
, int height
, int stride
), (data
, format
, width
, height
, stride
), NULL
)
66 wxDL_METHOD_DEFINE( void, cairo_line_to
,
67 (cairo_t
*cr
, double x
, double y
), (cr
, x
, y
), /**/)
68 wxDL_METHOD_DEFINE( void, cairo_move_to
,
69 (cairo_t
*cr
, double x
, double y
), (cr
, x
, y
), /**/)
70 wxDL_METHOD_DEFINE( void, cairo_new_path
,
71 (cairo_t
*cr
), (cr
), /**/)
72 wxDL_METHOD_DEFINE( void, cairo_paint
,
73 (cairo_t
*cr
), (cr
), /**/)
74 wxDL_METHOD_DEFINE( void, cairo_pattern_add_color_stop_rgba
,
75 (cairo_pattern_t
*pattern
, double offset
, double red
, double green
, double blue
, double alpha
), (pattern
, offset
, red
, green
, blue
, alpha
), /**/)
76 wxDL_METHOD_DEFINE( cairo_pattern_t
*, cairo_pattern_create_for_surface
,
77 (cairo_surface_t
*surface
), (surface
), NULL
)
78 wxDL_METHOD_DEFINE( cairo_pattern_t
*, cairo_pattern_create_linear
,
79 (double x0
, double y0
, double x1
, double y1
), (x0
, y0
, x1
, y1
), NULL
)
80 wxDL_METHOD_DEFINE( cairo_pattern_t
*, cairo_pattern_create_radial
,
81 (double cx0
, double cy0
, double radius0
, double cx1
, double cy1
, double radius1
), (cx0
, cy0
, radius0
, cx1
, cy1
, radius1
), NULL
)
82 wxDL_METHOD_DEFINE( void, cairo_pattern_destroy
,
83 (cairo_pattern_t
*pattern
), (pattern
), /**/)
84 wxDL_METHOD_DEFINE( void, cairo_pattern_set_extend
,
85 (cairo_pattern_t
*pattern
, cairo_extend_t extend
), (pattern
, extend
), /**/)
86 wxDL_METHOD_DEFINE( void, cairo_pattern_set_filter
,
87 (cairo_pattern_t
*pattern
, cairo_filter_t filter
), (pattern
, filter
), /**/)
88 wxDL_METHOD_DEFINE( void, cairo_rectangle
,
89 (cairo_t
*cr
, double x
, double y
, double width
, double height
), (cr
, x
, y
, width
, height
), /**/)
90 wxDL_METHOD_DEFINE( void, cairo_reset_clip
,
91 (cairo_t
*cr
), (cr
), /**/)
92 wxDL_METHOD_DEFINE( void, cairo_restore
,
93 (cairo_t
*cr
), (cr
), /**/)
94 wxDL_METHOD_DEFINE( void, cairo_rotate
,
95 (cairo_t
*cr
, double angle
), (cr
, angle
), /**/)
96 wxDL_METHOD_DEFINE( void, cairo_save
,
97 (cairo_t
*cr
), (cr
), /**/)
98 wxDL_METHOD_DEFINE( void, cairo_scale
,
99 (cairo_t
*cr
, double sx
, double sy
), (cr
, sx
, sy
), /**/)
100 wxDL_METHOD_DEFINE( void, cairo_set_dash
,
101 (cairo_t
*cr
, const double *dashes
, int num_dashes
, double offset
), (cr
, dashes
, num_dashes
, offset
), /**/)
102 wxDL_METHOD_DEFINE( void, cairo_set_fill_rule
,
103 (cairo_t
*cr
, cairo_fill_rule_t fill_rule
), (cr
, fill_rule
), /**/)
104 wxDL_METHOD_DEFINE( void, cairo_set_line_cap
,
105 (cairo_t
*cr
, cairo_line_cap_t line_cap
), (cr
, line_cap
), /**/)
106 wxDL_METHOD_DEFINE( void, cairo_set_line_join
,
107 (cairo_t
*cr
, cairo_line_join_t line_join
), (cr
, line_join
), /**/)
108 wxDL_METHOD_DEFINE( void, cairo_set_line_width
,
109 (cairo_t
*cr
, double width
), (cr
, width
), /**/)
110 wxDL_METHOD_DEFINE( void, cairo_set_operator
,
111 (cairo_t
*cr
, cairo_operator_t op
), (cr
, op
), /**/)
112 wxDL_METHOD_DEFINE( void, cairo_set_source
,
113 (cairo_t
*cr
, cairo_pattern_t
*source
), (cr
, source
), /**/)
114 wxDL_METHOD_DEFINE( void, cairo_set_source_rgba
,
115 (cairo_t
*cr
, double red
, double green
, double blue
, double alpha
), (cr
, red
, green
, blue
, alpha
), /**/)
116 wxDL_METHOD_DEFINE( void, cairo_stroke
,
117 (cairo_t
*cr
), (cr
), /**/)
118 wxDL_METHOD_DEFINE( void, cairo_stroke_preserve
,
119 (cairo_t
*cr
), (cr
), /**/)
120 wxDL_METHOD_DEFINE( cairo_surface_t
*, cairo_surface_create_similar
,
121 (cairo_surface_t
*other
, cairo_content_t content
, int width
, int height
), (other
, content
, width
, height
), NULL
)
122 wxDL_METHOD_DEFINE( void, cairo_surface_destroy
,
123 (cairo_surface_t
*surface
), (surface
), /**/)
124 wxDL_METHOD_DEFINE( void, cairo_translate
,
125 (cairo_t
*cr
, double tx
, double ty
), (cr
, tx
, ty
), /**/)
127 DECLARE_NO_COPY_CLASS(wxCairoLibrary
)